Changeset 53198 in webkit


Ignore:
Timestamp:
Jan 13, 2010 1:09:21 PM (14 years ago)
Author:
dumi@chromium.org
Message:

Refactoring DatabaseAuthorizer to use a CaseFoldingHash function
for the set of whitelisted sqlite functions, and fixing some
indenting issues.

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=33612

  • storage/DatabaseAuthorizer.cpp:

(WebCore::DatabaseAuthorizer::allowFunction):

  • storage/DatabaseAuthorizer.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53196 r53198  
     12010-01-13  Dumitru Daniliuc  <dumi@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Refactoring DatabaseAuthorizer to use a CaseFoldingHash function
     6        for the set of whitelisted sqlite functions, and fixing some
     7        indenting issues.
     8
     9        https://bugs.webkit.org/show_bug.cgi?id=33612
     10
     11        * storage/DatabaseAuthorizer.cpp:
     12        (WebCore::DatabaseAuthorizer::allowFunction):
     13        * storage/DatabaseAuthorizer.h:
     14
    1152010-01-13  Carol Szabo  <carol.szabo@nokia.com>
    216
  • trunk/WebCore/storage/DatabaseAuthorizer.cpp

    r53177 r53198  
    345345int DatabaseAuthorizer::allowFunction(const String& functionName)
    346346{
    347   if (m_securityEnabled && !m_whitelistedFunctions.contains(functionName.lower()))
    348     return SQLAuthDeny;
    349 
    350   return SQLAuthAllow;
     347    if (m_securityEnabled && !m_whitelistedFunctions.contains(functionName))
     348        return SQLAuthDeny;
     349
     350    return SQLAuthAllow;
    351351}
    352352
  • trunk/WebCore/storage/DatabaseAuthorizer.h

    r53177 r53198  
    105105    bool m_readOnly : 1;
    106106
    107     HashSet<String> m_whitelistedFunctions;
     107    HashSet<String, CaseFoldingHash> m_whitelistedFunctions;
    108108};
    109109
Note: See TracChangeset for help on using the changeset viewer.