Closed Bug 477857 Opened 15 years ago Closed 8 years ago

digest and hmac without optional encoding argument causes all digests or hmac to fail on page

Categories

(Core Graveyard :: XForms, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Leigh.Klotz, Unassigned)

References

()

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5

Firefox XForms.xpi 0.8.6ff3

XForms 1.1 defines digest(string, string, string?) and hmac(string, string, string, string?).

If the final argument is omitted, all calls to digest and hmac fail.
If an empty string is passed instead, hmac and digest use the default encoding.

I suspect a bad pointer for a missing expected argument which wasn't noticed as optional.




Reproducible: Always
I guess we should document this somewhere, but Mozilla XForms currently doesn't support optional parameters w.r.t. xpath.  With the extensible xpath in FF3 we have to provide interface definitions for all of the xpath methods we handle which means no optional parameters.  Instead we try to support empty parameters, like empty strings, etc.

We can leave this bug open since it is a bug as far as XForms spec compliance.  And if someone wants to drive this, we might be able to figure out how to signal to xpath via interface or some other mechanism that a parameter is optional.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Note that the attached tests are not exactly the ones from the XForms test suite.
The tests insist on case-equivalence for hexadecimal representation, but that's not required.  The forthcoming XForms 1.1 test suite will use
translate(digest(...), 'ABC...', 'abc...') in the "hex" tests (but not the base64 ones obviously).
RIP xforms
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: