User tests: Successful: Unsuccessful:
I added an optional sha512 hash to my update extension xml file, which is autogenerated for the extension update zip-file. Deploying my extension on an Update Server which is also described here: https://manual.joomla.org/docs/building-extensions/install-update/update-server/.
When there is a space and/or newline, which I unfortunately added in my xml file, the upload breaks.
Trimming of the sha512 string value (and other hashes) in the validation of the hash from the xml update file.
<updates>
<update>
<name>Depot</name>
<description>Depot component</description>
<element>com_depot</element>
<type>component</type>
<version>0.9.25</version>
<infourl title="Gitea Versioning">
https://git.kuschel.at/tom/depot
</infourl>
<downloads>
<downloadurl type="full" format="zip">https://kuschel.at/update/depot_0.9.24.zip</downloadurl>
</downloads>
<tags>
<tag>dev</tag> <!-- Development versions, very unstable and pre-alpha (e.g. nightly builds) -->
<!-- <tag>alpha</tag> --> <!-- Alpha quality software (features not implemented, show-stopper bugs) -->
<!-- <tag>beta</tag> --> <!-- Beta quality software (all features implemented, show-stopper bugs possible,minor bugs almost certain) -->
<!-- <tag>rc</tag> --> <!-- Release Candidate quality software (no show stopper bugs, minor bugs may still be present) -->
<!-- <tag>stable</tag> --> <!-- Production quality software. All other tags are currently ignored. -->
</tags>
<targetplatform name="joomla" version="5.[0123]" />
<php_minimum>8.1</php_minimum>
<sha512>
e63c8b4203b6fdc69f51f3d963fa44231a5df2b5e1f2a2a230856a97d62a7e11f852c274c3b9ac7145cb45cf57e4c59b8906c016bcb339c75137c830df5eba35
</sha512>
<maintainer>KW4NZ</maintainer>
<maintainerurl>https://kuschel.at</maintainerurl>
</update>
</updates>
Alternative test (from @obuisard):
1 - Download the test extension https://updates.simplifyyourweb.com/free/backgroundstretch/v200/mod_backgroundstretch.zip
2 - Install on a test site.
3 - The version of the module is 2.0.0. A 2.0.1 update is available. Go to Extensions -> Update.
4 - Check for updates (the update server's xml file contains spaces like above).
5 - Try and update 'Background Stretch'.
6 - Before using this patch, the update should fail with a message like this one:
The checksum verification failed. Please make sure you are using the correct update server!
7 - Apply the PR.
8 - When trying to update, the update should go through.
The update is canceled because the two hashes are different.
The update is done because the two hashes are identical.
Please select:
Documentation link for docs.joomla.org: https://manual.joomla.org/docs/building-extensions/install-update/update-server/
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
PR-5.2-dev
|