Skip to content

Restrict context var override on package page & support timezone and language query params

Mario Oenning requested to merge moson/aurweb:fix-context-vars into master

Users can (accidentally) override context vars with query params.
This may lead to issues when rendering templates (e.g. comments=...).

Fixes aurweb-errors#534

Support setting the timezone as well as the language via query params:

  • The timezone parameter previously only worked on certain pages. Now it's working globally.
  • While we're at it, let's also add the language as a possible parameter.
  • Refactor: Combine all code for the timestamp and language logic into their respective functions.
  • Remove unused AURTZ cookie.
  • Add test code to cover all scenarios.

Merge request reports

Loading