Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7438

weinre target not setting server url when from script's src attribute for https

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-weinre
    • Labels:
      None

      Description

      The file weinre.web/modules/weinre/target/Target.coffee file calculates the weinre server URL based on the script src url, but only accepts http and not https.

      Reported by Sam Placette.

      PR: https://github.com/apache/cordova-weinre/pull/4

        Activity

        Hide
        pmuellr Patrick Mueller added a comment -

        fixed in commit: d1694e49d9955c8a6e821a3bafbeb489ad593441

        published in release: 2.0.0-pre-HZO3BMNG (available at npm)

        Show
        pmuellr Patrick Mueller added a comment - fixed in commit: d1694e49d9955c8a6e821a3bafbeb489ad593441 https://git-wip-us.apache.org/repos/asf?p=cordova-weinre.git;a=commitdiff;h=d1694e49d9955c8a6e821a3bafbeb489ad593441;hp=feb2f061d63582a2067cd1a35bddc17cc43a543b published in release: 2.0.0-pre-HZO3BMNG (available at npm)
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user pmuellr commented on the pull request:

        https://github.com/apache/cordova-weinre/pull/4#issuecomment-53970173

        I opened a bug for this, and have the fix in master:

        https://issues.apache.org/jira/browse/CB-7438

        Next build will get the change.

        Show
        githubbot ASF GitHub Bot added a comment - Github user pmuellr commented on the pull request: https://github.com/apache/cordova-weinre/pull/4#issuecomment-53970173 I opened a bug for this, and have the fix in master: https://issues.apache.org/jira/browse/CB-7438 Next build will get the change.
        Show
        pmuellr Patrick Mueller added a comment - This is now in master: https://github.com/apache/cordova-weinre/commit/d1694e49d9955c8a6e821a3bafbeb489ad593441
        Hide
        pmuellr Patrick Mueller added a comment - - edited

        suggested fix

        from:

        pattern = /(http:\/\/(.*?)\/)/
        

        to

        pattern = /((https?:)?\/\/(.*?)\/)/
        

        in the setWeinreServerURLFromScriptSrc() function in weinre.web/modules/weinre/target/Target.coffee

        Show
        pmuellr Patrick Mueller added a comment - - edited suggested fix from: pattern = /(http:\/\/(.*?)\/)/ to pattern = /((https?:)?\/\/(.*?)\/)/ in the setWeinreServerURLFromScriptSrc() function in weinre.web/modules/weinre/target/Target.coffee

          People

          • Assignee:
            pmuellr Patrick Mueller
            Reporter:
            pmuellr Patrick Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development