- MGR: Fix bug in browser cookie detection code where firefox v3

cookie detection was returning true even for cookies that don't
        exist.
        
    clientgui/
        browser.cpp, .h

svn path=/trunk/boinc/; revision=18292
This commit is contained in:
Rom Walton 2009-06-04 13:18:23 +00:00
parent 689bfc61bd
commit 302f0e8d8d
3 changed files with 19 additions and 10 deletions

View File

@ -5060,3 +5060,11 @@ Rom 3 June 2009
AccountInfoPage.cpp
AccountManagerInfoPage.cpp
ProjectInfoPage.cpp
Rom 4 June 2009
- MGR: Fix bug in browser cookie detection code where firefox v3
cookie detection was returning true even for cookies that don't
exist.
clientgui/
browser.cpp, .h

View File

@ -484,18 +484,10 @@ bool detect_cookie_mozilla_v2(
}
#if defined(__APPLE__)
// sqlite3 is not av ailable on Mac OS 10.3.9
extern int sqlite3_open(const char *filename, sqlite3 **ppDb) __attribute__((weak_import));
extern int sqlite3_close(sqlite3 *) __attribute__((weak_import));
extern int sqlite3_exec(sqlite3*, const char *sql, sqlite3_callback, void *, char **errmsg) __attribute__((weak_import));
extern void sqlite3_free(char *z) __attribute__((weak_import));
#endif
bool detect_cookie_mozilla_v3(
std::string profile_root, std::string& project_url, std::string& name, std::string& value
) {
bool retval = false;
std::string tmp;
std::string hostname;
char query[1024];
@ -540,9 +532,10 @@ bool detect_cookie_mozilla_v3(
if ( !cookie.value.empty() ) {
value = cookie.value;
retval = true;
}
return true;
return retval;
}

View File

@ -42,4 +42,12 @@ bool detect_cookie_safari(std::string& project_url, std::string& name, std::stri
bool detect_cookie_firefox_2(std::string& project_url, std::string& name, std::string& value);
bool detect_cookie_firefox_3(std::string& project_url, std::string& name, std::string& value);
#if defined(__APPLE__)
// sqlite3 is not av ailable on Mac OS 10.3.9
extern int sqlite3_open(const char *filename, sqlite3 **ppDb) __attribute__((weak_import));
extern int sqlite3_close(sqlite3 *) __attribute__((weak_import));
extern int sqlite3_exec(sqlite3*, const char *sql, sqlite3_callback, void *, char **errmsg) __attribute__((weak_import));
extern void sqlite3_free(char *z) __attribute__((weak_import));
#endif
#endif