Reviewed & tested by the community
Project:
Signature Field
Version:
3.0.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2024 at 20:13 UTC
Updated:
10 Sep 2026 at 11:19 UTC
Jump to comment: Most recent
Comments
Comment #4
mukeshaddweb commentedComment #5
gokulg commentedTested MR !11 on Drupal 11.4.6 with PHP 8.4.24
Before patch:
- Invalid or partially valid color values were passed directly to _signature_field_color_unpack()
- This resulted in PHP deprecation warnings from hexdec() due to invalid characters
After applying the patch:
- Input is properly validated using regex (only #RGB / #RRGGBB allowed)
- Invalid values are rejected at form level
- _signature_field_color_unpack() safely returns NULL for invalid input
- Widget handles NULL values safely and avoids processing invalid data
Result:
- No deprecation warnings
- Input validation prevents incorrect values
- Code is now robust and consistent
RTBC.