Closed Bug 1717314 Opened 1 year ago Closed 1 year ago

Configuring a default app for an external protocol (scheme) handler should work (not prompt / show a dialog) for external links if they are redirects

Categories

(Firefox :: File Handling, defect)

Firefox 89
defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- wontfix
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- fixed

People

(Reporter: raistlin.credo, Assigned: Gijs)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

  1. Open Run dialog window (Win+R), enter "https://tinyurl.com/4tcvt3dw", press Enter.
  2. "Choose an application to open the acestream link" window appears. Choose an application there (e. g. Notepad), set "Always use this application to open acestream links" checkbox, press "Open link".
  3. Notepad will be launched.
  4. Repeat step 1.

Actual results:

"Choose an application to open the acestream link" window appears again.

Expected results:

Notepad should be launched without prompt.

Hi,
I have tried to reproduce the issue on Windows 10, but the expected result occured, Notepad was launched without prompt.
Can you clarify how is this issue related to Firefox Browser? Thanks in advance,
Regards,

Jerónimo.

Flags: needinfo?(raistlin.credo)

It seems that the issue can't be reproduced with Win+R. Originally I run into it with Telegram (under Windows 8.1 x64). So instead of step 1 please perform step 0 and new step 1.
Step 0:
Join the Telegram chat by opening https://t.me/joinchat/SnEWb1Mci28xM2Iy
Step 1:
Press any button that contains "Ace" word, for example "Смотреть Ace 1".

Flags: needinfo?(raistlin.credo)

Hi raistlin.credo,
I'm still unable to reproduce this issue, even with provided new steps. Can you confirm if this is not related to an operative system matter?
Also, could you answer the following questions in order to further investigate this issue, and clarify how is this issue related to Firefox Browser?

  1. Does this issue happen with a new profile? Here is a link on how to create a new profile: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
    Can you test the issue while in Safe Mode. You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode.

  2. Does this issue occur in the latest nightly version of firefox? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/

If you are still able to reproduce it, please, share further information with us, like screenshots, screen recording, or more specific steps.

Thanks,
Jerónimo.

Flags: needinfo?(raistlin.credo)

Yes, I do can confirm that it is not an OS issue (well, at least if it is not related to Windows 8.1 specifically).
On a clean Windows 8.1 x86 (a virtual machine, only VMware is installed):

  1. Install latest Firefox (taken on your link), Telegram.
  2. Import the following reg file:

REGEDIT4

[HKEY_CURRENT_USER\Software\Classes\acestream]
@="Ace Stream protocol"
"URL Protocol"=""

[HKEY_CURRENT_USER\Software\Classes\acestream\shell\open\command]
@="notepad.exe "%1""

  1. Launch Firefox, make it the default app.
  2. Sign in Telegram, press "Смотреть Ace 1" in SrachTV chat.
    The link opens in Firefox, then "Choose the application to open the acestream link" window appears.
  3. Set "Always use..." checkbox, press Open Link.
    Notepad launches.
  4. Press "Смотреть Ace 1" in SrachTV chat again.
    "Choose the application to open the acestream link" window appears again.
Flags: needinfo?(raistlin.credo)

Reg file should look like this, actually:

REGEDIT4

[HKEY_CURRENT_USER\Software\Classes\acestream]
@="Ace Stream protocol"
"URL Protocol"=""

[HKEY_CURRENT_USER\Software\Classes\acestream\shell\open\command]
@="notepad.exe \"%1\""

Hi raistlin.credo,
I'm still unable to reproduce this issue on Win10, using 90.0 (64-bit) and Nightly 92.0a1 (2021-07-13) (64-bit) versions, even with provided new steps.

Does this issue occur in the latest nightly version of firefox? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/

If you are still able to reproduce it, please, share further information with us, like screen recording, or more specific steps.

I've assigned a component in order to get the dev team involved.
'Firefox-File Handling' team: if the component is not relevant, please, change it to a more appropriate one.

Regards,
Jerónimo.

Component: Untriaged → File Handling
Flags: needinfo?(raistlin.credo)

I'm still unable to reproduce this issue on Win10
I believe it's worth to try to reproduce the bug under Windows 8.1.

I don't know what further information to share with you. All I know is that FF 88 was free of this bug.

'Firefox-File Handling' team: if the component is not relevant
I have no idea if it is relevant or not.

Flags: needinfo?(raistlin.credo)

(In reply to raistlin.credo from comment #7)

I'm still unable to reproduce this issue on Win10
I believe it's worth to try to reproduce the bug under Windows 8.1.

I don't know what further information to share with you. All I know is that FF 88 was free of this bug.

So the symptoms here seem like something that was caused by bug 1678255, but that landed in 88. Are you sure 88 was fine, or did you assume you updated to 89 and must have had 88 previously, ie it's possible you were comparing with 87?

If you go to about:config and create a boolean pref network.protocol-handler.prompt-from-external and set it to false, does that resolve the issue?

Broadly, after the change from bug 1678255 Firefox will (now) prompt when an external program passes it a link that it cannot handle itself, to avoid an infinite loop between some other program and Firefox that just pass the same link back and forth (often creating infinite tabs in Firefox in the process).

This means that I believe the real issue here is this:

(In reply to raistlin.credo from comment #7)

  1. Sign in Telegram, press "Смотреть Ace 1" in SrachTV chat.
    The link opens in Firefox, then "Choose the application to open the acestream link" window appears.

Why does the link open in Firefox? Why doesn't the acestream link open directly in notepad, as that's what you configured Windows to do?

Flags: needinfo?(raistlin.credo)

If you go to about:config and create a boolean pref network.protocol-handler.prompt-from-external and set it to false, does that resolve the issue?

Yes! Thank you!

Why does the link open in Firefox? Why doesn't the acestream link open directly in notepad, as that's what you configured Windows to do?

Because the initial link isn't looks like an acestream link, it's something like https://tinyurl.com/4tcvt3dw. I need FF to convert it to a normal acestream link to process it further.

Flags: needinfo?(raistlin.credo)
Assignee: nobody → gijskruitbosch+bugs
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Regressed by: 1678255
Summary: Always use this app checkbox state is ignored for external links → Configuring a default app for an external protocol (scheme) handdler should work (not prompt / show a dialog) for external links if they are redirects
Has Regression Range: --- → yes

Thanks! We should fix the case where the request is a redirect.

Summary: Configuring a default app for an external protocol (scheme) handdler should work (not prompt / show a dialog) for external links if they are redirects → Configuring a default app for an external protocol (scheme) handler should work (not prompt / show a dialog) for external links if they are redirects
Attachment #9233169 - Attachment description: Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r?nika!,pbz! → Bug 1717314 - do not force a dialog for https-redirect-to-external-protocol links from external sources, r?nika!,pbz!,#necko-reviewers
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/bb055da29523
do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin

Backed out for causing bc failures in browser_protocol_ask_dialog_external

Backout link: https://hg.mozilla.org/integration/autoland/rev/032eab1651e8c2d649d71032ad4562898bfd9a6a

Push with failures

Failure log

Flags: needinfo?(gijskruitbosch+bugs)

TFW you get bit by your own patches. The test failed on macOS because the infinite-loop protocol protection recognizes that the dummy app path that the mocked handler is using is the same as the main app path, and thus prompts to avoid an infinite loop. Oops. Have to come up with an actually-external path for the automated test to work on macOS. Looks like Safari is guaranteed to exist (but we don't have access to other apps in /Applications/ anymore, that the user didn't install themselves? So TextEdit.app and the like are out, not sure why...

Anyway, https://treeherder.mozilla.org/jobs?repo=try&revision=a4fdcb2c74f950c3c76bd334efda7ae1119c9cdf to see whether I fixed it...

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/f4b6d8ef4fda
do not force a dialog for https-redirect-to-external-protocol links from external sources, r=nika,pbz,necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Duplicate of this bug: 1711592
You need to log in before you can comment on or make changes to this bug.