You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by alsorokin <gi...@git.apache.org> on 2016/04/22 17:32:16 UTC

[GitHub] cordova-medic pull request: CB-11140 Path CSP tag to allow Appium ...

GitHub user alsorokin opened a pull request:

    https://github.com/apache/cordova-medic/pull/99

    CB-11140 Path CSP tag to allow Appium to execute async scripts

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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-medic CB-11140

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-medic/pull/99.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #99
    
----
commit f4fdb03a2ea2d74ab1f78f6c62ae0a062b0beab1
Author: Alexander Sorokin <al...@akvelon.com>
Date:   2016-04-22T15:29:25Z

    CB-11140 Path CSP tag to allow Appium to execute async scripts

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-11140 Patch CSP tag to allow Appium...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-medic/pull/99


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-11140 Patch CSP tag to allow Appium...

Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on the pull request:

    https://github.com/apache/cordova-medic/pull/99#issuecomment-214296252
  
    LGTM apart from one minor comment


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-medic pull request: CB-11140 Patch CSP tag to allow Appium...

Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on a diff in the pull request:

    https://github.com/apache/cordova-medic/pull/99#discussion_r60904512
  
    --- Diff: medic/medic-appium.js ---
    @@ -241,6 +241,44 @@ function parseElementtreeSync(filename) {
         return new elementTree.ElementTree(elementTree.XML(contents));
     }
     
    +function addCspSource(appPath, directive, source) {
    +    var cspInclFile = path.join(appPath, "www/csp-incl.js");
    +    var indexFile = path.join(appPath, "www/index.html");
    +    var cspFile = fs.existsSync(cspInclFile) ? cspInclFile : indexFile;
    +    var cspContent = fs.readFileSync(cspFile, util.DEFAULT_ENCODING);
    +    var cspTagOpening = "<meta http-equiv=\"Content-Security-Policy\" content=\"";
    +    var cspRule = directive + " " + source;
    +    var cspRuleReg = new RegExp(directive + "[^;\"]+" + source.replace("*", "\\*"));
    +
    +    util.medicLog("Adding CSP source \"" + source + "\" to directive \"" + directive + "\"");
    +
    +    if (cspContent.match(cspRuleReg)) {
    +        util.medicLog("It's already there.");
    +    } else if (util.contains(cspContent, directive)) {
    +        // if the directive is there, just add the source to it
    +        cspContent = cspContent.replace(directive, cspRule);
    +        console.log(1);
    --- End diff --
    
    Please remove this debug logging


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org