Closed Bug 941394 Opened 7 years ago Closed 1 year ago
valid keygen keytypes are returning undefined
Oh, I see, something like this: data:text/html,<keygen id="foo" keytype="notrsa"><script>alert(document.getElementById("foo").keytype)</script> That alerts empty string for me in Firefox. Are you sure you shouldn't be filing your bug on Chrome instead (where it does in fact return "notrsa")?
Apologies, all around. I did in fact open up bugs with every browser, however Firefox's was supposed to be the inverse is the issue. keytype never shows up. Check http://jsbin.com/EdUWoXo/3/edit for the example. This should be alerting rsa, but it is returning undefined. I believe this is because your implementation of keygen is just a select element, and the keygen attribute is not on it's IDL
Summary: invalid keygen keytypes are not returning an empty string → valid keygen keytypes are returning undefined
Ah, so like this: data:text/html,<keygen id="foo" keytype="notrsa"><script>alert(typeof document.getElementById("foo").keytype)</script> Presumably this will be fixed when bug 101019 is fixed.
Depends on: html5-keygen
Actually, like this data:text/html,<keygen id="foo" keytype="rsa"><script>alert(typeof document.getElementById("foo").keytype)</script> I would hope it is fixed when bug 101019 is fixed. This means that it is not really possible to accurately detect the keygen attribute. It would be great if you'd be able to fix this bug in the mean time, however I understand if you want to mark it as a dupe and hope for the best.
There's really no sane way to fix this without fixing bug 101019 as far as I can tell...
haha, so it is the IDL issue then? Okey doke.
Hi, Due to the fact this issue is still reproducible and depends on bug 101019, which is in NEW status, I shall mark this issue as NEW. Thank you, Vlad
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
(In reply to patrickkettner from comment #0) > if the keytype is anything other than rsa, it should return an empty string. Please don't break keytype "ec": <keygen name="name" challenge="random" keytype="ec" keyparams="secp521r1"/> https://github.com/fx-dev-playground/gecko/blob/central_default/security/manager/ssl/nsKeygenHandler.cpp#L503 https://github.com/fx-dev-playground/gecko/blob/central_default/security/manager/ssl/nsKeygenHandler.cpp#L96
Assignee: nobody → jkt
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
1 year ago
Depends on: 1315460
You need to log in before you can comment on or make changes to this bug.