Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-562

appc-security properties do not handle bool values

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 4.0.0
    • Fix Version/s: Release 4.0.0
    • Component/s: Titanium
    • Labels:
      None
    • Environment:

      appc -V 0.2.247

    • Severity:
      Major
    • Sprint:
      2015 Sprint 08 Tooling

      Description

      I believe there's a bug in the local readBooleanFromProps helper in the Titanium CLI hook resulting in the two appc-security-* properties to always be evaluated as true when the type is set to bool.

      To reproduce:

      Build a project with trace appc run -p android -T device -b -l trace to verify that:

      <property name="appc-security-jailbreak-detect">false</property>
      

      and:

      <property name="appc-security-jailbreak-detect" type="string">false</property>
      

      correctly give:

      [TRACE] encryption policy = remote, jailbreak detect = 0, debugger detect = 1
      

      while:

      <property name="appc-security-jailbreak-detect" type="bool">false</property>
      

      gives:

      [TRACE] encryption policy = remote, jailbreak detect = 1, debugger detect = 1
      

      Cause

      The readBooleanFromProps in the Titanium CLI hook expects type to be boolean while that should be bool

      It also looks like the fallback if type is not set should evaluate !!prop.value rather then !!prop.

      PR incoming.

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code