Closed Bug 1220322 Opened 9 years ago Closed 9 years ago

Change migration URI from mozilla.org to support.mozilla.org in firefox.js

Categories

(Core :: DOM: Push Subscriptions, defect)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox44 --- fixed
firefox45 --- fixed
b2g-v2.5 --- fixed

People

(Reporter: tanvi, Assigned: tanvi)

References

Details

Attachments

(1 file, 2 obsolete files)

As soon as we have https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/push working with some the Push Notification text (bug 1220250) we will need to update the urls in our codebase to point here instead of https://www.mozilla.org/en-US/firefox/push/.

For the one time notification prompt on upgrade to let the user know about notification changes, we can link directly to a part of the page using something like:
https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/push#w_[What's-New]

Code to change is here:
http://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#998
Hi Joni,

I'm not sure how to make the url fragment work.  I've tried it with the mixed content page:

https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox#w_The%20icon%20is%20a%20gray%20triangle
or
https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox#w_The-icon-is-a-gray-triangle

Do spaces can translated into dashes or something else?  Can you provide an example url fragment so I can use that for Push.  We have to put it in the codebase, so I want to make sure we get it right.

Thanks!
Flags: needinfo?(jsavage)
Attached patch Bug1220322-11-01-15.patch (obsolete) — Splinter Review
Changed the url for the one-time notification on upgrade to point to the sumo article instead.

We need to get this reviewed, landed, and uplifted today in order for it to be released to dev edition on Tuesday.  Otherwise, we will need to reprompt after we get the right url.  Hence I am r? to markh who may be working before other browser peers are.  This should be a pretty quick and easy review.  If Mark doesn't get to it, I will change the r? to Jared or Matt.

Pushed to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6b08ff61a5f
Attachment #8681708 - Flags: review?(markh)
Assignee: nobody → tanvi
Attached patch Bug1220322-11-01-15B.patch (obsolete) — Splinter Review
Added a url fragment to the previous version so that we point directly to the "Upgraded Notifications" section.

+pref("browser.push.warning.migration.infoURL", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/push#w_upgraded-notifications");

On my browser that takes me to https://support.mozilla.org/en-US/kb/push-notifications-firefox?as=u&utm_source=inproduct#w_upgraded-notifications
Attachment #8681708 - Attachment is obsolete: true
Attachment #8681708 - Flags: review?(markh)
Attachment #8681712 - Flags: review?(markh)
Comment on attachment 8681712 [details] [diff] [review]
Bug1220322-11-01-15B.patch

Review of attachment 8681712 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/app/profile/firefox.js
@@ +995,5 @@
>  #endif
>  
>  pref("browser.geolocation.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/geolocation/");
>  pref("browser.push.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/push/");
> +pref("browser.push.warning.migration.infoURL", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/push#w_upgraded-notifications");

Nit: Why not "browser.push.warning.migrationURL"?

::: testing/profiles/prefs_general.js
@@ +115,5 @@
>  // at least once will mean that codepath is still tested in automation.
>  user_pref("network.sntp.maxRetryCount", 1);
>  
>  // Make sure the notification permission migration test doesn't hit the network.
> +user_pref("browser.push.warning.migration.infoURL", "http://%(server)s/alerts-dummy/infoURL");

Please keep the other pref here too and have their paths differ for debugging.
Comment on attachment 8681712 [details] [diff] [review]
Bug1220322-11-01-15B.patch

Review of attachment 8681712 [details] [diff] [review]:
-----------------------------------------------------------------

The "content" panel of preferences still uses the old URL, which I assume is intended - if that's the case, it LGTM.
Attachment #8681712 - Flags: review?(markh) → review+
I missed Matt's review - please also make the changes he suggests.
Updated per Matt's suggestions.  Carrying over r+.

The web page content has also been updated so you can see it here:
https://support.mozilla.org/en-US/kb/push-notifications-firefox?as=u&utm_source=inproduct#w_upgraded-notifications
Attachment #8681712 - Attachment is obsolete: true
Attachment #8681749 - Flags: review+
Comment on attachment 8681749 [details] [diff] [review]
Bug1220322-11-01-15C.patch

Approval Request Comment
[Feature/regressing bug #]: https://bugzilla.mozilla.org/show_bug.cgi?id=1216271
[User impact if declined]: Security issue.  With the changes to notifications in Firefox 44, Firefox gives extra Push permissions to sites that have enabled local notifications without their consent.  In order to inform the users of this change, we show a one time notification.  This patch updates the link to the right page that provides the necessary information for the user to take action.  Without this patch, the user will not be directed to the right place.
[Describe test coverage new/current, TreeHerder]: browser/base/content/test/alerts/browser_notification_permission_migration.js already exists to test the general functionality.  But since mochitests don't make real network connections, there is dummy url in place.
[Risks and why]: 
[String/UUID change made/needed]: None
Attachment #8681749 - Flags: approval-mozilla-aurora?
(In reply to Tanvi Vyas [:tanvi] from comment #1)
> Hi Joni,
> 
> I'm not sure how to make the url fragment work.  I've tried it with the
> mixed content page:
> 
> https://support.mozilla.org/en-US/kb/mixed-content-blocking-
> firefox#w_The%20icon%20is%20a%20gray%20triangle
> or
> https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox#w_The-
> icon-is-a-gray-triangle
> 
Got this working by using a lowercase "t" in "#w_The" above.  Clearing needinfo.

https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox#w_the-icon-is-a-gray-triangle
Flags: needinfo?(jsavage)
Pointing out that the content on the web page still needs to change via https://bugzilla.mozilla.org/show_bug.cgi?id=1209992 to show permissions change via Content Preferences.
(In reply to Bill Maggs (bmaggs) from comment #11)
> Pointing out that the content on the web page still needs to change via
> https://bugzilla.mozilla.org/show_bug.cgi?id=1209992 to show permissions
> change via Content Preferences.

The "Upgraded Notifications" section is correct and that is the most important for this bug.  We will get other parts of the page fixed up tomorrow.
Updating subject to reflect that this bug only changes the migration URI.
Summary: Change push uris from mozilla.org to support.mozilla.org in firefox.js → Change migration URI from mozilla.org to support.mozilla.org in firefox.js
Blocks: 1220531
Comment on attachment 8681749 [details] [diff] [review]
Bug1220322-11-01-15C.patch

Taking it as it fixes an important issue.
Attachment #8681749 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/mozilla-central/rev/798c82c8a96d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: