[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-115.9.0esr-13.5-1] Bug 42472: Spoof timezone in XSLT.

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Tue Mar 26 17:21:23 UTC 2024



Pier Angelo Vendrame pushed to branch base-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser


Commits:
d81946dd by Pier Angelo Vendrame at 2024-03-26T18:21:17+01:00
Bug 42472: Spoof timezone in XSLT.

- - - - -


1 changed file:

- dom/xslt/xslt/txEXSLTFunctions.cpp


Changes:

=====================================
dom/xslt/xslt/txEXSLTFunctions.cpp
=====================================
@@ -591,7 +591,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) /



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d81946dd6c277e4714504a91eaa8b8eed61caaf2

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d81946dd6c277e4714504a91eaa8b8eed61caaf2
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240326/5f90b8b5/attachment-0001.htm>


More information about the tbb-commits mailing list