Skip to content

Conversation

@jbrichau
Copy link
Member

@jbrichau jbrichau commented Jan 2, 2025

The method GRPlatform>>secureHashFor: accepts both a String and a ByteArray as argument. The contents of the ByteArray can be any sequence of bytes, so it should not represent a valid UTF8 encoded String (for example).

In this PR, we extend the test case to also cover the use of a ByteArray.

In Seaside, all invocations of the method always passed a String instance as argument, until the e-tag implementation for the file libraries, which also uses it to generate a hash for any served file, which may include binary files (e.g. images). See SeasideSt/Seaside#1325.

…y as argument since this method is used in Seaside with any String or ByteArray
@codecov
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.59%. Comparing base (5e8378a) to head (8f04339).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   85.58%   85.59%   +0.01%     
==========================================
  Files        2050     2050              
  Lines       14100    14110      +10     
==========================================
+ Hits        12067    12077      +10     
  Misses       2033     2033              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jbrichau jbrichau merged commit 38b9f56 into master Jan 2, 2025
28 checks passed
@jbrichau jbrichau deleted the secureHash-test branch November 18, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants