| Summary: | Private Browsing Detection from JS in Safari | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | achristensen, ap, beidson, bfulgham, charliew, mjs, sihui_liu, webkit-bug-importer, wenson_hsieh, wilander |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://underpassapp.com/StopTheMadness/PrivateWindowTest.html | ||
|
Description
Ahmad Saleem
2023-07-03 12:25:58 PDT
(function () {
"use strict";
function isPrivate(flag) {
document.getElementById("status").textContent = flag ? "Yes" : "No";
}
window.indexedDB.open("test", 1).onupgradeneeded = function(event) {
const db = event.target.result;
const objectStore = db.createObjectStore("test", { autoIncrement: true });
try {
objectStore.put(new Blob());
isPrivate(false);
} catch (error) {
const message = error.message;
isPrivate(typeof message === "string" && /BlobURLs are not yet supported/.test(message));
} finally {
db.close();
window.indexedDB.deleteDatabase("test");
}
};
})();
____________
This is JS used by website leveraging IndexedDB.
Example provided shows that private browsing is detected because blob URls aren't supported. *** This bug has been marked as a duplicate of bug 156347 *** |