Skip to content

light checksum for joomlaupdate#17632

Merged
mbabker merged 7 commits intojoomla:3.9-devfrom
alikon:patch-92
Mar 17, 2018
Merged

light checksum for joomlaupdate#17632
mbabker merged 7 commits intojoomla:3.9-devfrom
alikon:patch-92

Conversation

@alikon
Copy link
Copy Markdown
Contributor

@alikon alikon commented Aug 20, 2017

...from #17619 (comment)
add light checksum for joomla update

Summary of Changes

trigger the checksum check on update
if the update server manifest have an hash tag

Testing Instructions

<extensionset name="Joomla Core Test Updateserver" description="The Joomla Core Update Server for Tests of Alpha, Beta and RC Releases">
 <extension name="Joomla" element="joomla" type="file" version="3.8.0-beta4" targetplatformversion="3.8" detailsurl="http://localhost/test/extension_testpr17632.xml" />
</extensionset>
<?xml version="1.0" ?>
<updates>
	<update>
		<name>Joomla! 3.8</name>
		<description>Joomla! 3.8 CMS</description>
		<element>joomla</element>
		<type>file</type>
		<version>3.8.0-beta4</version>
		<infourl title="Joomla!">https://www.joomla.org</infourl>
		<downloads>
			<downloadurl type="full" format="zip">http://localhost/test/Joomla_pr17632-Update_Package.zip</downloadurl>
		</downloads>
		<tags>
			<tag>stable</tag>
		</tags>
		<maintainer>Joomla! PLT</maintainer>
		<maintainerurl>https://www.joomla.org</maintainerurl>
		<targetplatform name="joomla" version="3.[3456789]"/>
		<php_minimum>5.3.10</php_minimum>
	</update>
</updates>

Test case 1 - no checksum hashtag in the update server manifest

Expected result

a notice is showed

screenshot from 2017-09-02 09-08-18

to test the next 2 cases we need to :

  • calculate the hash value (for example sha256)
  • -(on linux) run sha256sum Joomla_pr17632-Update_Package.zip
    screenshot from 2017-09-02 09-27-09

Test case 2 - correct checksum hashtag in the update server manifest

  • add a <sha256>correcthashvalue</sha256> tag in the current update server instance something like:

screenshot from 2017-09-02 09-30-38

Expected result

a info is showed
screenshot from 2017-09-02 09-37-45

Test case 3 - wrong checksum hashtag in the update server manifest

  • add a <sha256>wronghashvalue</sha256> tag in the current update server instance

Expected result

a warning is showed

screenshot from 2017-09-02 09-40-32

Documentation Changes Required

new tags :

  • <sha256></sha256>
  • <sha384></sha384>
  • <sha512></sha512>

alikon added 3 commits August 20, 2017 11:40
add light checksum to joomlaupdate
model
lang string
@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Aug 20, 2017

@mbabker can we have your final words on the algos as SHA1 and MD5 are very well known to be weak. Expecial as the core should provide a more secure algo.

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented Aug 20, 2017

Personally I'd rather not support SHA1 and MD5 since they are weak. If SHA256 doesn't have the same weaknesses then that'd be fine.

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Aug 21, 2017

ok now #17619 support only sha256

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Aug 21, 2017

should we consider to add sha512 "longer is better" ?

@zero-24
Copy link
Copy Markdown
Contributor

zero-24 commented Aug 21, 2017

should we consider to add sha512 "longer is better" ?

Sounds good. ;)

@anibalsanchez
Copy link
Copy Markdown
Contributor

@alikon detailed the steps to create list.xml and extension_sts.xml.... so I guess he was thinking to enter the Url on the "Custom URL" field.

In "Joomla Update", you have "Options", where you can play with "Update Channel"
For testing, you can change it to a "Custom URL".

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Sep 2, 2017

@anibalsanchez , @NunoLopes96
added more clear test info ;)

@ghost
Copy link
Copy Markdown

ghost commented Nov 1, 2017

@anibalsanchez , @NunoLopes96 are Test Info @alikon suggested unclear?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17632.

@anibalsanchez
Copy link
Copy Markdown
Contributor

It is OK for me.

@ghost
Copy link
Copy Markdown

ghost commented Nov 1, 2017

@anibalsanchez can i alter above Comment as successfully Test?

@anibalsanchez
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on f61f6ab


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17632.

@anibalsanchez
Copy link
Copy Markdown
Contributor

Test OK

My notes:

These are my xmls:

list_testpr17632.xml

<extensionset name="Joomla Core Test Updateserver" description="The Joomla Core Update Server for Tests of Alpha, Beta and RC Releases">
 <extension name="Joomla" element="joomla" type="file" version="3.8.1" targetplatformversion="3.8" detailsurl="http://local-server.extly.com/j38/extension_testpr17632.xml" />
</extensionset>

extension_testpr17632.xml

<?xml version="1.0" ?>
<updates>
	<update>
		<name>Joomla! 3.8</name>
		<description>Joomla! 3.8 CMS</description>
		<element>joomla</element>
		<type>file</type>
		<version>3.8.1</version>
		<infourl title="Joomla!">https://www.joomla.org</infourl>
		<downloads>
			<downloadurl type="full" format="zip">http://local-server.extly.com/j38/Joomla_pr17632-Update_Package.zip</downloadurl>
		</downloads>
		<tags>
			<tag>stable</tag>
		</tags>
		<sha256>e8339bed3cbba5eebb7d355e026d29594ec164420beebe97839b0019b630ed96</sha256>
		<maintainer>Joomla! PLT</maintainer>
		<maintainerurl>https://www.joomla.org</maintainerurl>
		<targetplatform name="joomla" version="3.[3456789]"/>
		<php_minimum>5.3.10</php_minimum>
	</update>
</updates>

@NunoLopesPT
Copy link
Copy Markdown
Contributor

NunoLopesPT commented Nov 10, 2017

I have tested this item ✅ successfully on f61f6ab

Great Work !!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17632.

n3
n1
n2

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Nov 10, 2017

@NunoLopes96 just a follow up from your work at Joomla GSoC 17 project https://github.com/joomla-projects/gsoc17_expand_extension_manager

@ghost
Copy link
Copy Markdown

ghost commented Nov 11, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 11, 2017
@joomla-cms-bot joomla-cms-bot changed the title [3.8] - light checksum for joomlaupdate light checksum for joomlaupdate Dec 22, 2017
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 22, 2017
@joomla-cms-bot joomla-cms-bot removed this from the Joomla 3.9.0 milestone Dec 22, 2017
@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Dec 22, 2017
@joomla-cms-bot joomla-cms-bot added PR-staging RTC This Pull Request is Ready To Commit labels Dec 22, 2017
@Quy
Copy link
Copy Markdown
Contributor

Quy commented Feb 15, 2018

@brianteeman Please retag for v3.9.0. Darn bot!

@brianteeman brianteeman added this to the Joomla 3.9.0 milestone Feb 15, 2018
@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Mar 12, 2018

conflict solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants