Feature PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
20 Sep 2023

Summary of Changes

Shorter string for media version, 6 symbols instead of 32

Testing Instructions

Apply patch, and clean the cache.
Check source code of the rendered page, for js/css files hash, example for core.js

Actual result BEFORE applying this Pull Request

The hash is 32 symbols long

Expected result AFTER applying this Pull Request

The hash is 6 symbols long

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2023
Category Libraries
avatar Fedik Fedik - open - 20 Sep 2023
avatar Fedik Fedik - change - 20 Sep 2023
Status New Pending
avatar Fedik Fedik - change - 20 Sep 2023
The description was changed
avatar Fedik Fedik - edited - 20 Sep 2023
avatar joomla-cms-bot joomla-cms-bot - change - 20 Sep 2023
Category Libraries JavaScript Repository Libraries
avatar Fedik Fedik - change - 20 Sep 2023
Labels Added: Feature PR-5.0-dev
avatar HLeithner
HLeithner - comment - 20 Sep 2023

@wilsonge fears it's too short and could create a collision, using 6 characters should be 16.777.215 possibilities compared to 4 which are 65535

avatar Fedik
Fedik - comment - 20 Sep 2023

Changed to 6

avatar Fedik Fedik - change - 20 Sep 2023
The description was changed
avatar Fedik Fedik - edited - 20 Sep 2023
avatar HLeithner HLeithner - change - 20 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-20 19:50:41
Closed_By HLeithner
avatar HLeithner HLeithner - close - 20 Sep 2023
avatar HLeithner HLeithner - merge - 20 Sep 2023
avatar HLeithner
HLeithner - comment - 20 Sep 2023

thanks

avatar dgrammatiko
dgrammatiko - comment - 20 Sep 2023

Sorry but reducing the hash on the Joomla.assets.json like that (because of the extra bytes) is wrong. We introduced the hardcoded hashing on build time to reduce false invalidations, but compromising the string might have severe effects (hashes end up the same, cache not invalidated). This is the wrong type of optimisation...

my 2c anyways

Add a Comment

Login with GitHub to post a comment