Bug 105706 - Update service does not show updates when detailed OS versions are sent.
Summary: Update service does not show updates when detailed OS versions are sent.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: high critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Updates
  Show dependency treegraph
 
Reported: 2017-02-02 16:34 UTC by Georg Schölly
Modified: 2020-02-01 14:20 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
band aid fix for update php (12.56 KB, application/x-bzip)
2019-05-29 17:01 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Schölly 2017-02-02 16:34:44 UTC
Description:
For at least a couple of LibreOffice versions checking for updates shows no updates even though it should. Consider this:

Request A:

    curl -A "LibreOffice 5.3.0.3 (7074905676c47b82bbcfbea1aeefc84afe1c50e1; MacOSX; X86_64; )" "http://update.libreoffice.org/check.php?pkgfmt=dmg"

Response A:

    HTTP OK / 200
    <p>No update for your LibreOffice version.</p>

Request B:

    curl -A "LibreOffice 5.3.0.3 (7074905676c47b82bbcfbea1aeefc84afe1c50e1; MacOSX; X86_64; CPU Threads: 4; OS Version: Mac OS X 10.12.3; UI Render: default; Layout Engine: new; )" "http://update.libreoffice.org/check.php?pkgfmt=dmg"

Response B:

    HTTP OK / 200
    <p><b>Error:</b> Only LibreOffice can access the update service.</p>

This leads to some installations not showing any updates.

----

The root cause seems to be that an unknown response is considered equal to "no update". This should rather generate an error such that a user can check on the website manually.

I haven't found the code repository for update.libreoffice.org so I'm not able to write a patch myself. If someone points me there, I'd be happy to have a look.

Steps to Reproduce:
1. Go to the settings.
2. Go to "LibreOffice" -> "Online Update"
3. Check "Send OS version and basic hardware information"
4. Click on the "Check Now" button.

Actual Results:  
"No Updates available" is shown, even if there should be some.

If you capture the traffic, you'll see that an error "Only LibreOffice can access the update service." is shown.

Expected Results:
"Update available" or "Problem contacting the server" should be shown.


Reproducible: Always

User Profile Reset: Yes

Additional Info:
It would be nice if http://update.libreoffice.org/check.php would respond with a 403 forbidden code upon navigating there with a browser. 

Why not use JSON instead of parsing a HTML page?


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Alex Thurgood 2017-02-03 11:09:47 UTC

*** This bug has been marked as a duplicate of bug 80110 ***
Comment 2 Georg Schölly 2017-02-03 11:15:01 UTC
I'd argue that this is a separate issue rather than a duplicate. I think I may have explained that poorly.

The core issue is, that if "Send OS version and basic hardware information" is checked, the PHP script does not recognize LibreOffice and responds with a error message instead of responding with whether an update is available or not.
Comment 3 Alex Thurgood 2017-02-03 12:09:15 UTC
I'm all for reasoned argument :-) Confirming and setting as new.
Comment 4 Alex Thurgood 2017-02-03 12:11:27 UTC
Adding cloph to CC, as I think this is his area, and more likely to be able to point you in the right direction - if I'm wrong, sorry in advance.
Comment 5 QA Administrators 2018-02-04 03:30:25 UTC Comment hidden (obsolete)
Comment 6 eisa01 2018-04-14 11:06:39 UTC
This is still present

The checkbox to send extra information is not the default, but it is a pretty serious bug if people are kept on old versions because the update check fails. With that in mind I'm increasing the severity
Comment 7 QA Administrators 2019-04-15 02:50:04 UTC Comment hidden (obsolete)
Comment 8 Georg Schölly 2019-04-15 18:49:59 UTC
The server script has not been changed so the bug still exists (check.php).

If someone could point me to the source code of http://update.libreoffice.org/check.php I could try to fix it.
Comment 9 Buovjaga 2019-04-20 19:01:37 UTC
(In reply to Georg Schölly from comment #8)
> The server script has not been changed so the bug still exists (check.php).
> 
> If someone could point me to the source code of
> http://update.libreoffice.org/check.php I could try to fix it.

Looks like it's here: https://cgit.freedesktop.org/libreoffice/website/tree/check.php?h=update
Summary with repo address: https://cgit.freedesktop.org/libreoffice/website/?h=update
Weird that it is not found in the gerrit project list.

So I guess if you have a patch suggestion, you can just attach it to this report and cloph can review it.
Comment 10 Julien Nabet 2019-05-29 17:01:45 UTC
Created attachment 151763 [details]
band aid fix for update php

I could reproduce this on Debian.

I don't know what's "BundledLanguages" so I proposed a quick and naive band-aid:
- Test of the original pattern
  if ok:  keep on the treatment
  if ko: test another simpler pattern without BundledLanguages part
    if ok: keep on the treatment
    if ko: return empty array => error message.

(I bzip2 the file because I don't know if it's ok to attach a php file)
Comment 11 eisa01 2019-06-08 10:59:36 UTC
Setting OS to all as per previous comment with the fix
Comment 12 Julien Nabet 2020-01-28 19:59:36 UTC
https://cgit.freedesktop.org/libreoffice/website/tree/check.php?h=update indicates:
obsolete website config ( now using silverstripe, see https://github.com/tdf )

https://github.com/tdf contains 67 repos.

1) is the problem still reproduceable?
2) where's the new update.php in https://github.com/tdf?
Comment 13 sbucks 2020-01-31 13:38:23 UTC
Confirming that this still happens with LibreOffice 6.3.4.2 (build 60da17e045e08f1793c57c00ba83cdfce946d0aa) on macOS Catalina 10.15.3 (x86_64). A manual update check does not find the current LO 6.4.0.
Is this perhaps a duplicate of #84122?
Comment 14 eisa01 2020-02-01 14:20:41 UTC
6.3.3 offers an update to 6.3.4 when I send detailed info, so that works properly now


Same with 6.2.7 to 6.2.8

sbucks: The issue you are describing is that LO only offers updates within the same branch, as described in bug #97302

Version: 6.2.7.1
Build ID: 23edc44b61b830b7d749943e020e96f5a7df63bf
CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded