View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010476 | mantisbt | custom fields | public | 2009-05-09 03:09 | 2010-02-22 14:34 |
Reporter | Striker | Assigned To | dhx | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.7 | ||||
Target Version | 1.2.0 | Fixed in Version | 1.2.0 | ||
Summary | 0010476: Logic incorrect for minimum length on custom string field | ||||
Description | The following logic currently exists in both 1.1.7 and git (line 1172), function custom_field_validate: $t_valid &= ( 0 == $t_length_min ) || ( $t_length > $t_length_min ); This the use of ">" causes submitted reports to fail if the amount of characters equals the minimum. The line should instead be: $t_valid &= ( 0 == $t_length_min ) || ( $t_length >= $t_length_min ); | ||||
Steps To Reproduce |
| ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Attached Files | custom_field_api.php.patch (632 bytes)
diff -rupN HEAD/core/custom_field_api.php PATCH/core/custom_field_api.php --- HEAD/core/custom_field_api.php 2009-08-02 11:31:38.000000000 -0500 +++ PATCH/core/custom_field_api.php 2009-08-02 11:32:40.000000000 -0500 @@ -1164,7 +1164,7 @@ function custom_field_validate( $p_field $t_valid &= ereg( $t_valid_regexp, $p_value ); } // check string length - $t_valid &= ( 0 == $t_length_min ) || ( $t_length > $t_length_min ); + $t_valid &= ( 0 == $t_length_min ) || ( $t_length >= $t_length_min ); $t_valid &= ( 0 == $t_length_max ) || ( $t_length <= $t_length_max ); break; case CUSTOM_FIELD_TYPE_NUMERIC: | ||||
MantisBT: master-1.2.x dc9b8b14 2009-10-28 20:47 Details Diff |
Fix 0010476: Logic incorrect for minimum length of custom field string A string which is equal in length to the minimum allowed should be accepted. Thanks to Striker for this patch. |
Affected Issues 0010476 |
|
mod - core/custom_field_api.php | Diff File | ||
MantisBT: master 7ab8078b 2009-10-28 20:47 Details Diff |
Fix 0010476: Logic incorrect for minimum length of custom field string A string which is equal in length to the minimum allowed should be accepted. Thanks to Striker for this patch. |
Affected Issues 0010476 |
|
mod - core/custom_field_api.php | Diff File |