svn path=/trunk/boinc/; revision=12385

This commit is contained in:
Charlie Fenton 2007-04-17 09:19:32 +00:00
parent 6e7a4b2240
commit ad5511a0c7
1 changed files with 18 additions and 12 deletions

View File

@ -63,18 +63,24 @@ bool detect_setup_authenticator_safari(std::string& project_url, std::string& au
theNameString = [ aCookie name ];
// is this the right cookie?
if (starts_with([ theNameString cStringUsingEncoding:NSMacOSRomanStringEncoding ], "Setup")) {
theValueString = [ aCookie value ];
authenticator = [ theValueString cStringUsingEncoding:NSMacOSRomanStringEncoding ];
// If validation failed, null out the authenticator just in case
// somebody tries to use it, otherwise copy in the real deal.
if (is_authenticator_valid(authenticator)) {
retval = true;
break;
} else {
authenticator = "";
}
#ifdef cStringUsingEncoding // Available only is OS 10.4 and later
if (!starts_with([ theNameString cStringUsingEncoding:NSMacOSRomanStringEncoding ], "Setup"))
continue;
theValueString = [ aCookie value ];
authenticator = [ theValueString cStringUsingEncoding:NSMacOSRomanStringEncoding ];
#else
if (!starts_with([ theNameString cString ], "Setup"))
continue;
theValueString = [ aCookie value ];
authenticator = [ theValueString cString ];
#endif
// If validation failed, null out the authenticator just in case
// somebody tries to use it, otherwise copy in the real deal.
if (is_authenticator_valid(authenticator)) {
retval = true;
break;
} else {
authenticator = "";
}
}