Bug 63053
| Summary: | IndexedDB: createObjectStore() should check if keypath is valid | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kentaro Hara <haraken> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | haraken, jsbell, robin.qiu.dev |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Kentaro Hara
The spec (http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-Object-optionalParameters) says "If keyPath is an array and any items in the array is not a valid key path, or if keyPath is a string and is not a valid key path then a NON_TRANSIENT_ERR error must be thrown".
However, the current createObjectStore() does not check the keypath argument and thus it does not throw any exception when we give an invalid keypath. I attached the test case that should throw an exception.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Robin Qiu
Forgot to attach the test case?
Robin Qiu
This bug was fixed, in commit 63663e38.
85 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000 85) if (!IDBIsValidKeyPath(keyPath)) {
86 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000 86) ec = IDBDatabaseException::NON_TRANSIENT_ERR;
87 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000 87) return 0;
88 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000 88) }
89 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000 89)
Robin Qiu
Duplicate bug, see bug 63054.
Joshua Bell
*** This bug has been marked as a duplicate of bug 63054 ***