U4-10301 - Change the PluginManager hash to use more reliable and consistent hashes

Created by Shannon Deminick 17 Aug 2017, 01:37:56 Updated by Sebastiaan Janssen 28 Aug 2017, 09:44:46

Relates to: U4-10213

Subtask of: U4-9609

Currently the hashes produced by the PluginManager to determine if it needs to rescan use the HashCodeCombiner which uses .NET HashCode's which has worked to-date however in some cases and based on different environments and .Net versions, it's possible that these hashes might not be reliable between different AppDomains on the site website.

This logic should be updated to use a reliable hash such as SHA1 just to be safe.

Comments

Shannon Deminick 17 Aug 2017, 01:40:34

PR here: https://github.com/umbraco/Umbraco-CMS/pull/2135

This updates the PluginManager to use the new HashGenerator instead of the HashCodeCombiner (have added notes about when the HashCodeCombiner should/shouldnt be used). Also updated the WebServiceServerMessenger to use the HashGenerator instead as well since it's more reliable between AppDomains and that hash is also used between AppDomains.

I've added tests for the HashGenerator and it's API is very similar to the HashCodeCombiner.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.6.6

Sprint: Sprint 66

Story Points: 1

Cycle: 4