<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7371</bug_id>
          
          <creation_ts>2015-02-26 15:16:46 +0000</creation_ts>
          <short_desc>Toaster managed mode: configuration variables page allows empty inputs into database</short_desc>
          <delta_ts>2015-11-26 13:25:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.8 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ionut Chisanovici">ionutx.chisanovici</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>alexandru.costinx.roman</cc>
    
    <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Alexandru Roman">alexandru.costinx.roman</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49087</commentid>
    <comment_count>0</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2015-02-26 15:16:46 +0000</bug_when>
    <thetext>Hi,

For 1.8_M3.RC1, commit: 40d80f9e019118ac7bcd268f21e350bc154a4a63 but with git revert for cb23e3043bf5c07f111787287a321df0ece647dd, in project configuration variable page, user can add empty records into orm_projectvariable which is causing toaster to return errors.

To reproduce this:
1. Create a new project
2. Click on &quot;Edit configuration variables&quot;
3. Add a new var name and value
4. Click on the &quot;Add variable&quot; button
5. Click once again the &quot;Add variable&quot; button (the button remains active)

sqlite&gt; select * from orm_projectvariable;
        id = 1
project_id = 1
      name = IMAGE_INSTALL_append
     value = 

        id = 2
project_id = 1
      name = PACKAGE_CLASSES
     value = package_rpm

        id = 3
project_id = 1
      name = MACHINE
     value = qemux86

        id = 4
project_id = 1
      name = SDKMACHINE
     value = x86_64

        id = 5
project_id = 1
      name = DISTRO
     value = poky

        id = 6
project_id = 1
      name = IMAGE_FSTYPES
     value = ext3 jffs2 tar.bz2

        id = 7
project_id = 2
      name = IMAGE_INSTALL_append
     value = 

        id = 8
project_id = 2
      name = PACKAGE_CLASSES
     value = package_rpm

        id = 9
project_id = 2
      name = MACHINE
     value = qemux86

        id = 10
project_id = 2
      name = SDKMACHINE
     value = x86_64

        id = 11
project_id = 2
      name = DISTRO
     value = poky

        id = 12
project_id = 2
      name = IMAGE_FSTYPES
     value = ext3 jffs2 tar.bz2
sqlite&gt; select * from orm_projectvariable;
        id = 1
project_id = 1
      name = IMAGE_INSTALL_append
     value = 

        id = 2
project_id = 1
      name = PACKAGE_CLASSES
     value = package_rpm

        id = 3
project_id = 1
      name = MACHINE
     value = qemux86

        id = 4
project_id = 1
      name = SDKMACHINE
     value = x86_64

        id = 5
project_id = 1
      name = DISTRO
     value = poky

        id = 6
project_id = 1
      name = IMAGE_FSTYPES
     value = ext3 jffs2 tar.bz2

        id = 7
project_id = 2
      name = IMAGE_INSTALL_append
     value = 

        id = 8
project_id = 2
      name = PACKAGE_CLASSES
     value = package_rpm

        id = 9
project_id = 2
      name = MACHINE
     value = qemux86

        id = 10
project_id = 2
      name = SDKMACHINE
     value = x86_64

        id = 11
project_id = 2
      name = DISTRO
     value = poky

        id = 12
project_id = 2
      name = IMAGE_FSTYPES
     value = ext3 jffs2 tar.bz2

        id = 13
project_id = 1
      name = MACHINE
     value = genericx86

        id = 14
project_id = 1
      name = 
     value = 

Cheers,
Ionut C</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49109</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2015-02-27 04:10:33 +0000</bug_when>
    <thetext>Here are the fix details:

  * When you add a variable, the “Add” button does now disable itself.

  * After testing, I also added code to disable “Add” when the variable name is set to empty. 

  * Finally, I added/fixed code to enforced the blocking of the variables that are managed outside this page, specifically BBLAYERS and MACHINE which are handled by the project detail page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56806</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Roman">alexandru.costinx.roman</who>
    <bug_when>2015-11-26 13:25:52 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>