Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected return value from Verifier.parseTagValueList: [object Map] #125

Closed
RealityRipple opened this issue Oct 8, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@RealityRipple
Copy link

Enabled the DMARC verification and ran into an issue... namely that the tagMap variable is not an instance of Map, even though it is...

Ignored error in parsing of DMARC record: DKIM verifier internal error (undefined): unexpected return value from Verifier.parseTagValueList: [object Map] (resource://dkim_verifier/helper.jsm:416:3) JS Stack trace: parseDMARCRecord @ dkimDMARC.jsm:327:9
getDMARCRecord @ dkimDMARC.jsm:278:18

As far as I can tell, it can only possibly be a -1, a -2, or a Map object, and the variable spitout confirms it's a Map object... I'd like to offer a solution, but I don't have one, other than removing the type check, which is generally a bad idea.

@lieser
Copy link
Owner

lieser commented Oct 20, 2018

Thanks a lot for reporting this. Seems like the instanceof operator has a problem if the variable was created in a different JavaScript code module, as the exact same check works without problems in a different place in dkimVerifier.jsm.

I will probably change it to a check done with Object.prototype.toString as described at https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/

@lieser lieser self-assigned this Oct 20, 2018
@lieser lieser added the bug label Oct 20, 2018
@lieser lieser added this to the 2.0.1 milestone Oct 20, 2018
@lieser
Copy link
Owner

lieser commented Jan 13, 2019

Should be fixed in the upcoming 2.0.1

@lieser lieser closed this as completed Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants