Page MenuHomePhabricator

Gerrit 3.x test instance loads content from third-party website fonts.gstatic.com
Closed, ResolvedPublicBUG REPORT

Event Timeline

Aklapper created this task.Jun 22 2020, 9:20 AM
hashar added projects: Regression, Upstream.EditedJun 22 2020, 9:37 AM
hashar added a subscriber: hashar.

That was an issue in Gerrit filed as https://bugs.chromium.org/p/gerrit/issues/detail?id=3985 and fixed by Gerrit 2.13 5eb59e374ecd36fd835bb484c13e163fdbe9fa71

Eventually 3.2.0 had 7f77168c3df5339ea4800ecff41b21df16aed6d1 ( https://gerrit-review.googlesource.com/c/gerrit/+/255560 ) which while still referring to a local copy of the font, also adds a fallback to fonts.gstatic.com:

 /* latin-ext */
 @font-face {
   font-family: 'Roboto';
   font-style: normal;
   font-weight: 400;
-  src: local('Roboto'), local('Roboto-Regular'),
-       url('../fonts/Roboto-Regular.woff2') format('woff2'),
-       url('../fonts/Roboto-Regular.woff') format('woff');
-  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
+  font-display: swap;
+  src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');
+  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
 }

When previously we had something using the browser font and fallback to Gerrit served files:

@font-face {
   src: local('Roboto'), local('Roboto-Regular'),
      url('../fonts/Roboto-Regular.woff2') format('woff2'),
      url('../fonts/Roboto-Regular.woff') format('woff');

We now have a fallback to fonts.gstatic.com:

src: local('Roboto'), local('Roboto-Regular'),
url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2) format('woff2');

Which is a regression in Gerrit 3.2 worth filing a bug to them.

Filed upstream as https://bugs.chromium.org/p/gerrit/issues/detail?id=12980 and that automatically subscribed the commit author @ google ;]

hashar updated the task description. (Show Details)Jun 22 2020, 9:48 AM
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.Jun 22 2020, 9:57 AM
QChris updated the task description. (Show Details)Jun 23 2020, 5:57 PM
QChris added a subscriber: QChris.

See T240264 and T239122.

QChris changed the subtype of this task from "Task" to "Bug Report".Jun 26 2020, 11:30 AM
QChris updated the task description. (Show Details)Jun 26 2020, 12:19 PM

@Paladox said that the gitiles plugin might also load fonts externally. That's still to investigate.

@Paladox said that the gitiles plugin might also load fonts externally. That's still to investigate.

Yup, @Paladox was right. Since the root cause is different, and the fix is completely different, I filed a separate ticket at T256506.

QChris closed this task as Resolved.Jun 26 2020, 8:16 PM
QChris claimed this task.

@QChris seems that task is closed as resolved and fixed PolyGerrit. It doesn't fix gitiles, see https://github.com/GerritCodeReview/gitiles/blob/master/resources/com/google/gitiles/static/base.css#L19

QChris added a comment.EditedJun 26 2020, 8:52 PM

As said above, the gitiles issue/bug/fix is T256506. Let's discuss over there :-)