Skip to content
Snippets Groups Projects
Verified Commit 00f7a83c authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 42472: Spoof timezone in XSLT.

parent 7fb6786f
Branches
Tags
1 merge request!1453TB 43587: Rebased legacy onto 115.22.0esr
......@@ -585,7 +585,14 @@ nsresult txEXSLTFunctionCall::evaluate(txIEvalContext* aContext,
// http://exslt.org/date/functions/date-time/
PRExplodedTime prtime;
PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &prtime);
PR_ExplodeTime(
PR_Now(),
// We are not allowed to access the Document when evaluating this, so
// fall back to the general function.
nsContentUtils::ShouldResistFingerprinting(RFPTarget::Unknown)
? PR_GMTParameters
: PR_LocalTimeParameters,
&prtime);
int32_t offset =
(prtime.tm_params.tp_gmt_offset + prtime.tm_params.tp_dst_offset) /
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment