Bug 123497 - Infinite redirection when opening LibreOffice help
Summary: Infinite redirection when opening LibreOffice help
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.0.0.1 rc
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-16 13:03 UTC by Maxime Launois
Modified: 2019-06-25 12:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The HTML file loaded in the browser when opening the LibreOffice help (502 bytes, text/html)
2019-02-16 13:05 UTC, Maxime Launois
Details
A patch to the HTML file loaded when opening the LibreOffice help (647 bytes, patch)
2019-02-16 13:06 UTC, Maxime Launois
Details
Final, true patch to the HTML file loaded when opening the LibreOffice help (708 bytes, patch)
2019-02-17 14:02 UTC, Maxime Launois
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Launois 2019-02-16 13:03:22 UTC
Description:
On the Firefox web browser, trying to open the LibreOffice help by clicking on the "LibreOffice help" menu item in any module [for the first time?] redirects infinitely to the same page, likely preventing to display the help.
(Note: although LibreOffice 6.2.0.3 is mentioned in the Additional Information, this bug might apply to *all* versions since 6.0.0.1 rc).

Steps to Reproduce:
1. Open the Help menu in any LibreOffice module.
2. Click on the "LibreOffice help" menu item.
3. Your default browser should start up in a few seconds, loading the help page.
4. If your default browser is set to Firefox, an infinite redirect is made to the same page as the current one (file path depending on Operating Systems, but in Windows, it is something like file:///C:/Users/<your-username>/AppData/Local/Temp/lu12088klh.tmp/NewHelp0.html).

Actual Results:
In Firefox, infinite redirect is made (i.e. file:///C:/Users/<your-username>/AppData/Local/Temp/lu12088klh.tmp/NewHelp0.html redirects to file:///C:/Users/<your-username>/AppData/Local/Temp/lu12088klh.tmp/NewHelp0.html, ad infinitum).

Expected Results:
The LibreOffice help for the current module should be loaded instead, i.e. file:///C:/Program%20Files/LibreOffice/help/fr/text/shared/main0108.html?System=WIN&DbPAR=WRITER&HID=.uno:HelpIndex#bm_id3149178


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.2.0.3 (x64)
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
Threads CPU : 2; OS : Windows 10.0; UI Render : par défaut; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded
Comment 1 Maxime Launois 2019-02-16 13:05:16 UTC
Created attachment 149327 [details]
The HTML file loaded in the browser when opening the LibreOffice help
Comment 2 Maxime Launois 2019-02-16 13:06:50 UTC
Created attachment 149328 [details]
A patch to the HTML file loaded when opening the LibreOffice help
Comment 3 Olivier Hallot 2019-02-16 15:06:00 UTC
Can you please update the version tested. LO 6.0.0.1 was not even released. Does it happens with the 6.1 or 6.2  family?
Comment 4 Olivier Hallot 2019-02-16 15:09:24 UTC
(In reply to Olivier Hallot from comment #3)
> Can you please update the version tested. LO 6.0.0.1 was not even released.
> Does it happens with the 6.1 or 6.2  family?

never mind
Comment 5 Olivier Hallot 2019-02-16 23:27:04 UTC
Cannot reproduce with

Versão: 6.2.0.3 (x64)
ID de compilação: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
Threads da CPU:4; SO:Windows 6.1; Realizador da interface: padrão; VCL: win; 
Local: en-US (pt_BR); Idioma de IU: pt-BR
Calc: threaded

Firefox 65.0.1 (32bit)

Is it a Firefox/Windows setting?
Comment 6 Maxime Launois 2019-02-17 13:41:00 UTC
(In reply to Olivier Hallot from comment #5)
> Cannot reproduce with
> 
> Versão: 6.2.0.3 (x64)
> ID de compilação: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
> Threads da CPU:4; SO:Windows 6.1; Realizador da interface: padrão; VCL: win; 
> Local: en-US (pt_BR); Idioma de IU: pt-BR
> Calc: threaded
> 
> Firefox 65.0.1 (32bit)
> 
> Is it a Firefox/Windows setting?

I found what was wrong! The problem comes from the <meta http-equiv="refresh"> HTML tag. The URL attribute of this tag is file:///C:/Program%20Files/LibreOffice/program/../help/index.html?Target=swriter/.uno%3AHelpIndex&Language=fr&System=WIN&Version=6.2, and obviously Firefox can't handle it.
If JavaScript is disabled or blocked either by a third-party extension such as NoScript or in the Firefox Development Tools settings, the script block with

> window.location.href = "file:///C:/Program%20Files/LibreOffice/program/../help/index.html?Target=swriter/.uno%3AHelpIndex&Language=fr&System=WIN&Version=6.2"

won't execute, and using the redirection mechanism provided by the <meta> block fails, resulting in an infinite loop.

I'm updating the patch and bug reproduction instructions right now!
Comment 7 Maxime Launois 2019-02-17 13:46:08 UTC
IMPORTANT EDIT FOR "Steps to Reproduce": changing
> Steps to Reproduce:
> 1. Open the Help menu in any LibreOffice module.
> 2. Click on the "LibreOffice help" menu item.
> 3. Your default browser should start up in a few seconds, loading the help page.
> 4. If your default browser is set to Firefox, an infinite redirect is made to the same page as the current one (file path depending on Operating Systems, but in Windows, it is something like file:///C:/Users/<your-username>/AppData/Local/Temp/lu12088klh.tmp/NewHelp0.html).

to the following:

Prerequisites:
  - The default web browser to open HTML files (or file:/// URLs) is Firefox.
  - The scripts (at least in <script> blocks) coming from file:/// must be blocked, either by the browser, or by  a third-party extension.

Steps to reproduce:
  1. Open the Help menu in any LibreOffice module.
  2. Click on the "LibreOffice help" menu item.
  3. Your default browser should start up in a few seconds, loading the help page.
  4. If your default browser is set to Firefox, AND JavaScript coming from file:/// URLs is blocked, an infinite redirect is made to the same page as the current one (file path depending on Operating Systems, but in Windows, it is something like file:///C:/Users/<your-username>/AppData/Local/Temp/lu12088klh.tmp/NewHelp0.html).

Also updating the attachment #149328 [details] to reflect the bugs.
Comment 8 Maxime Launois 2019-02-17 14:02:53 UTC
Created attachment 149348 [details]
Final, true patch to the HTML file loaded when opening the LibreOffice help

Final patch to the bug that solves the <meta http-equiv="refresh"> tag issue.
Obsoletes the attachment #149328 [details].
Comment 9 Olivier Hallot 2019-06-25 12:32:24 UTC
The Help system now in browser relies heavily on javascript, and this by design.

Disabling Javascript thru a Firefox extension will break several pieces of the Help page.