diigo-cache: webkey page logs in with the password manager
/cache/ without a fragment is now a login form: petname (autocomplete=username) and cache id (type=password, autocomplete=current-password), the shape password managers fill from the entries the save button makes. Its inputs have no name, so a native submit (script failed) sends nothing; the key stays in memory, out of the address bar and history. Home links to it. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
961515d8db
commit
efaf74023d
3 files changed
+37
-2
No files matched your search
@@ -240,6 +240,17 @@ describe("fill via webkey and Cap'n Web (goal 1e)", () => {
|
||||
expect(html).toContain('<meta name="referrer" content="no-referrer">');
|
||||
});
|
||||
|
||||
it("without a fragment, the webkey page is a login form a password manager can fill, which posts nothing", async () => {
|
||||
const html = await (await call("/cache/")).text();
|
||||
const form = html.match(/<form id="login"[^]*?<\/form>/)?.[0] ?? "";
|
||||
expect(form).toMatch(/<input[^>]* autocomplete="username"/);
|
||||
expect(form).toMatch(/<input[^>]* type="password"[^>]* autocomplete="current-password"/);
|
||||
// no name attributes: a native submit carries no key anywhere
|
||||
expect(form).not.toMatch(/\bname=/);
|
||||
expect(form).not.toMatch(/\baction=/);
|
||||
expect(html).toContain("event.preventDefault()");
|
||||
});
|
||||
|
||||
it("serves capnweb's browser build itself (no third-party script beside the key)", async () => {
|
||||
const res = await call("/_capnweb.js");
|
||||
expect(res.headers.get("content-type")).toMatch(/javascript/);
|
||||
|
||||
Reference in new issue
Block a user