Skip to content

Update regex for hash validation in crypt_data.dart#10

Closed
dipu-bd wants to merge 1 commit into
masterfrom
dipu-bd-patch-1
Closed

Update regex for hash validation in crypt_data.dart#10
dipu-bd wants to merge 1 commit into
masterfrom
dipu-bd-patch-1

Conversation

@dipu-bd

@dipu-bd dipu-bd commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

@codecov-commenter

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
393 3 390 0
View the top 3 failed test(s) by shortest run time
test.crypt.crypt::Modular Crypt Format Decoder failure cases equal sign with hash value
Stack Traces | 0.011s run time
Failure:

Expected: throws <Instance of 'ArgumentError'> with `message`: 'Invalid argument (hash): expected B64 string without padding: "hash="'
  Actual: <Closure: () => CryptData>
   Which: threw ArgumentError:<Invalid argument (hash): must be characters in [a-zA-Z0-9/+.-]: "hash=">
          stack package:.../codecs/crypt/crypt_data.dart 135:7    CryptData.validate
                package:.../codecs/crypt/crypt_codec.dart 132:10  CryptDecoder.convert
                package:hashlib_codecs/src/crypt.dart 21:24                      fromCrypt
                test/crypt/crypt_test.dart 164:17                                main.<fn>.<fn>.<fn>.<fn>
                package:matcher                                                  expect
                test/crypt/crypt_test.dart 5:3                                   expectError
                test/crypt/crypt_test.dart 163:9                                 main.<fn>.<fn>.<fn>
                
          which has `message` with value 'Invalid argument (hash): must be characters in [a-zA-Z0-9/+.-]: "hash="' which is different.
                Expected: ... t (hash): expected B ...
                  Actual: ... t (hash): must be ch ...
                                        ^
                 Differ at offset 25
test.crypt.crypt_data::CryptData validate accepts "." and "-" in salt but not in hash
Stack Traces | 0.039s run time
Failure:

Expected: throws <Instance of 'ArgumentError'>
  Actual: <Closure: () => void>
   Which: returned <null>
test.crypt.crypt::Modular Crypt Format Decoder failure cases invalid character in hash value
Stack Traces | 0.048s run time
Failure:

Expected: throws <Instance of 'ArgumentError'> with `message`: 'Invalid argument (hash): expected B64 string without padding: "er*er"'
  Actual: <Closure: () => CryptData>
   Which: threw ArgumentError:<Invalid argument (hash): must be characters in [a-zA-Z0-9/+.-]: "er*er">
          stack package:.../codecs/crypt/crypt_data.dart 135:7    CryptData.validate
                package:.../codecs/crypt/crypt_codec.dart 132:10  CryptDecoder.convert
                package:hashlib_codecs/src/crypt.dart 21:24                      fromCrypt
                test/crypt/crypt_test.dart 158:17                                main.<fn>.<fn>.<fn>.<fn>
                package:matcher                                                  expect
                test/crypt/crypt_test.dart 5:3                                   expectError
                test/crypt/crypt_test.dart 157:9                                 main.<fn>.<fn>.<fn>
                
          which has `message` with value 'Invalid argument (hash): must be characters in [a-zA-Z0-9/+.-]: "er*er"' which is different.
                Expected: ... t (hash): expected B ...
                  Actual: ... t (hash): must be ch ...
                                        ^
                 Differ at offset 25

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@dipu-bd dipu-bd changed the title Update regex for hash validation in crypt_data.dart [draft] Update regex for hash validation in crypt_data.dart Jul 6, 2026
@dipu-bd dipu-bd marked this pull request as draft July 6, 2026 22:10
@dipu-bd dipu-bd changed the title [draft] Update regex for hash validation in crypt_data.dart Update regex for hash validation in crypt_data.dart Jul 6, 2026
@dipu-bd dipu-bd closed this Jul 8, 2026
@dipu-bd dipu-bd deleted the dipu-bd-patch-1 branch July 8, 2026 14: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