Closed
Bug 941394
Opened 11 years ago
Closed 5 years ago
valid keygen keytypes are returning undefined
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: patrickkettner, Assigned: jkt)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 Steps to reproduce: 1. go to data:text/html, <keygen keytype="notrsa"> 2. inspect the keytype of the element, using javascript Actual results: keygen.keytype returns notrsa Expected results: According to the spec (http://www.w3.org/TR/2012/WD-html5-20121025/the-keygen-element.html#attr-keygen-keytype), if the keytype is anything other than rsa, it should return an empty string. This is the only way (http://lists.w3.org/Archives/Public/public-html/2009Sep/0550.html) to detect if a platform can support it properly.
Comment 1•11 years ago
|
||
> 2. inspect the keytype of the element, using javascript
How exactly are you doing this?
Flags: needinfo?(patrickkettner)
Comment 2•11 years ago
|
||
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")?
Reporter | ||
Comment 3•11 years ago
|
||
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
Flags: needinfo?(patrickkettner)
Summary: invalid keygen keytypes are not returning an empty string → valid keygen keytypes are returning undefined
Comment 4•11 years ago
|
||
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
Reporter | ||
Comment 5•11 years ago
|
||
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.
Comment 6•11 years ago
|
||
There's really no sane way to fix this without fixing bug 101019 as far as I can tell...
Reporter | ||
Comment 7•11 years ago
|
||
haha, so it is the IDL issue then? Okey doke.
Comment 8•8 years ago
|
||
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
Updated•8 years ago
|
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Comment 9•8 years ago
|
||
(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
Updated•6 years ago
|
Priority: -- → P5
Assignee | ||
Comment 10•5 years ago
|
||
Bug 1315460 resolved this by removing support completely to match the web standard and also Chrome.
Assignee: nobody → jkt
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•