Closed Bug 930166 Opened 8 years ago Closed 8 years ago

Update all webmaker components to use the "csrf-token" meta name instead of "X-CSRF-TOKEN"

Categories

(Webmaker Graveyard :: webmaker.org, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giecrilj, Assigned: michiel)

References

()

Details

Attachments

(8 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 2013091200

Steps to reproduce:

Validate the page "Gallery - Mozilla Webmaker".


Actual results:

Errors found while checking this document as HTML5! 29 Errors, 1 warning(s), including:
Line 7, Column 63: Bad value X-CSRF-Token for attribute name on element meta: Keyword x-csrf-token is not registered.


Expected results:

Congratulations, etc.
OS: All → Linux
Hardware: All → x86_64
Component: General → webmaker.org
QA Contact: brett
That's not an error, that's the validator being too strict. On that note, which validator is flagging this?

The only restriction on a meta element "name" attribute is that if it is specified, there MUST be an associated "content" attribute as well. Other than that, the "name" attribute can be any string. As such, using the string "X-CSRF-Token" cannot lead to a validation error under HTML5 rules.
that said, the spec gives the following guideline for validators:

"Conformance checkers may use the information given on the WHATWG Wiki MetaExtensions page to establish if a value is allowed or not: values defined in this specification or marked as "proposed" or "ratified" must be accepted, whereas values marked as "discontinued" or not listed in either this specification or on the aforementioned page must be reported as invalid. Conformance checkers may cache this information (e.g. for performance reasons or to avoid the use of unreliable network connectivity)."

so we can either add the x-csrf-token as a proposal, or change the already proposed "csrf-token" name from applying to just "ruby" to simply being the name for csrf tokens irrespective of the underlying technology and switch from x-csrf-token to csrf-token instead.
morphing to tracking ticket to update all projects to use "csrf-token" rather than "X-CSRF-TOKEN"
Assignee: nobody → pomax
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: Webmaker home page is invalid → Update all webmaker components to use the "csrf-token" meta name instead of "X-CSRF-TOKEN"
patch for goggles
Attachment #833168 - Flags: review?(scott)
patch for login
Attachment #833170 - Flags: review?(kieran.sedgwick)
patch for thimble
Attachment #833172 - Flags: review?(scott)
patch for popcorn
Attachment #833173 - Flags: review?(scott)
patch for webmaker.org
Attachment #833175 - Flags: review?(cade)
patch for webmaker-profile
Attachment #833176 - Flags: review?(gavin)
patch for MakeAPI
Attachment #833177 - Flags: review?(cade)
patch for makeapi-client
Attachment #833178 - Flags: review?(cade)
To test these patches, you will need to check out "your" patch, as well as the login patch because that sets up the correct metaname-extraction-for-persona.
Comment on attachment 833170 [details] [review]
https://github.com/mozilla/login.webmaker.org/pull/203

ARRRRRRRRRRR plus.
Attachment #833170 - Flags: review?(kieran.sedgwick) → review+
Comment on attachment 833177 [details] [review]
https://github.com/mozilla/MakeAPI/pull/171

I think should we change this line: https://github.com/mozilla/MakeAPI/blob/master/views/admin.html#L9 to ' name="csrf-token" ' as well as in views/login.html
Attachment #833177 - Flags: review?(cade) → review-
Comment on attachment 833178 [details] [review]
https://github.com/mozilla/makeapi-client/pull/16

R+

You will want to tag this and update the apps that use it.
Attachment #833178 - Flags: review?(cade) → review+
Comment on attachment 833177 [details] [review]
https://github.com/mozilla/MakeAPI/pull/171

Looks good with the changes for the admin+login pages.
Attachment #833177 - Flags: review- → review+
Attachment #833173 - Flags: review?(scott) → review+
Attachment #833172 - Flags: review?(scott) → review+
Attachment #833168 - Flags: review?(scott) → review+
Attachment #833176 - Flags: review?(gavin) → review+
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/f8d563e6c2ee97ffcdcb14a64dd3020f775ff6a1
Merge pull request #171 from Pomax/bug930166

csrf-token rename
everything landed.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.