cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject cordova-plugin-file-transfer git commit: www/FileTransfer.js
Date Mon, 19 Jan 2015 19:36:50 GMT
Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 6db282025 -> 0481a2ad9


www/FileTransfer.js

CB-7316 Fix over-eager credentials pattern


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/0481a2ad
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/0481a2ad
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/0481a2ad

Branch: refs/heads/master
Commit: 0481a2ad92159fae8b4013020318d130ec653bd1
Parents: 6db2820
Author: Josh Soref <jsoref@blackberry.com>
Authored: Mon Jan 19 11:34:20 2015 -0500
Committer: Josh Soref <jsoref@blackberry.com>
Committed: Mon Jan 19 11:34:20 2015 -0500

----------------------------------------------------------------------
 www/FileTransfer.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/0481a2ad/www/FileTransfer.js
----------------------------------------------------------------------
diff --git a/www/FileTransfer.js b/www/FileTransfer.js
index ff4bbef..17fb782 100644
--- a/www/FileTransfer.js
+++ b/www/FileTransfer.js
@@ -33,7 +33,7 @@ function newProgressEvent(result) {
 }
 
 function getUrlCredentials(urlString) {
-    var credentialsPattern = /^http\:\/\/((.*?)\:(.*?))@.*$/g,
+    var credentialsPattern = /^https?\:\/\/(?:(?:(([^:@\/]*)(?::([^@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?).*$/,
         credentials = credentialsPattern.exec(urlString);
 
     return credentials && credentials[1];


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


Mime
View raw message