[tbb-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-115.9.0esr-13.5-1] Bug 42428: Make RFP spoof the timezone of document.lastModified.
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Wed Mar 20 10:06:14 UTC 2024
Pier Angelo Vendrame pushed to branch mullvad-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser
Commits:
96ab6401 by Pier Angelo Vendrame at 2024-03-20T11:06:04+01:00
Bug 42428: Make RFP spoof the timezone of document.lastModified.
- - - - -
1 changed file:
- dom/base/Document.cpp
Changes:
=====================================
dom/base/Document.cpp
=====================================
@@ -4103,10 +4103,11 @@ void Document::SetDocumentURI(nsIURI* aURI) {
}
}
-static void GetFormattedTimeString(PRTime aTime,
+static void GetFormattedTimeString(PRTime aTime, bool aUniversal,
nsAString& aFormattedTimeString) {
PRExplodedTime prtime;
- PR_ExplodeTime(aTime, PR_LocalTimeParameters, &prtime);
+ PR_ExplodeTime(aTime, aUniversal ? PR_GMTParameters : PR_LocalTimeParameters,
+ &prtime);
// "MM/DD/YYYY hh:mm:ss"
char formatedTime[24];
if (SprintfLiteral(formatedTime, "%02d/%02d/%04d %02d:%02d:%02d",
@@ -4124,7 +4125,9 @@ void Document::GetLastModified(nsAString& aLastModified) const {
if (!mLastModified.IsEmpty()) {
aLastModified.Assign(mLastModified);
} else {
- GetFormattedTimeString(PR_Now(), aLastModified);
+ GetFormattedTimeString(PR_Now(),
+ ShouldResistFingerprinting(RFPTarget::Unknown),
+ aLastModified);
}
}
@@ -11053,7 +11056,8 @@ void Document::RetrieveRelevantHeaders(nsIChannel* aChannel) {
mLastModified.Truncate();
if (modDate != 0) {
- GetFormattedTimeString(modDate, mLastModified);
+ GetFormattedTimeString(
+ modDate, ShouldResistFingerprinting(RFPTarget::Unknown), mLastModified);
}
}
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/96ab6401af562a726620e438435bbd0790d6b98e
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/96ab6401af562a726620e438435bbd0790d6b98e
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/20240320/69d68dd7/attachment-0001.htm>
More information about the tbb-commits
mailing list