cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: [CB-2235] Fixed file transfer whitelisting.
Date Wed, 23 Jan 2013 16:54:49 GMT
Updated Branches:
  refs/heads/master 8cab22f80 -> db2276836


[CB-2235] Fixed file transfer whitelisting.

The user agent sometimes being set to nil in iOS6 eventually led to the whitelist regex checks
being skipped.  Setting the user agent from the command delegate fixes this.


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/db227683
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/db227683
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/db227683

Branch: refs/heads/master
Commit: db22768362823bf6f84cbaead6c03dd1764f60b2
Parents: 8cab22f
Author: Max Woghiren <max.woghiren@gmail.com>
Authored: Wed Jan 23 11:04:55 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Jan 23 11:54:27 2013 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVFileTransfer.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/db227683/CordovaLib/Classes/CDVFileTransfer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVFileTransfer.m b/CordovaLib/Classes/CDVFileTransfer.m
index 128c954..8e05658 100644
--- a/CordovaLib/Classes/CDVFileTransfer.m
+++ b/CordovaLib/Classes/CDVFileTransfer.m
@@ -87,7 +87,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
 {
     [req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];
 
-    NSString* userAgent = [[self.webView request] valueForHTTPHeaderField:@"User-Agent"];
+    NSString* userAgent = [self.commandDelegate userAgent];
     if (userAgent) {
         [req setValue:userAgent forHTTPHeaderField:@"User-Agent"];
     }


Mime
View raw message