View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06330 | Bug reports | Expression Manager | public | 2012-07-17 02:08 | 2012-07-19 20:34 |
Reporter | danielf | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92+ | ||||
Fixed in Version | 1.92+ | ||||
Summary | 06330: Regex engine does not accept a leading zero even if explicitly specified as acceptable | ||||
Description | Regex validation fails when a text input is validated against an expression with a leading zero (e.g. the "Australian postcodes" regex - /^[0-9]{4}/ in the official documentation - would fail if the response starts with a zero). | ||||
Steps To Reproduce | 1.) Define a free text entry question The answer would not validate. | ||||
Additional Information | I have also noticed, that not limiting the answer length to the number of characters implied by the regex, after surpassing this implied limit, the regex would match (resulting in an illegal answer). E.g. typing anything as a 5th digit would satisfy the regex. | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 120711 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Google Chrome | ||||
Database type & version | MySQL 5.5 | ||||
Server OS (if known) | CentOS 5.8 | ||||
Webserver software & version (if known) | Apache 2.22 | ||||
PHP Version | 5.3.14 | ||||
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9016 |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9018 |
|
1.92+ version released. |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9050 |
|
LimeSurvey: master e60f4f74 2012-07-18 08:52 Details Diff |
Fixed issue 06330: Regex engine does not accept a leading zero even if explicitly specified as acceptable Dev core problem was that LEMval() was casting [0-9]+ to a number, so would strip off leading zeros. Now, if has leading zeros, they will be kept. |
Affected Issues 06330 |
|
mod - scripts/em_javascript.js | Diff File | ||
LimeSurvey: Yii a5247c5f 2012-07-18 08:53 Details Diff |
Fixed issue 06330: Regex engine does not accept a leading zero even if explicitly specified as acceptable Dev core problem was that LEMval() was casting [0-9]+ to a number, so would strip off leading zeros. Now, if has leading zeros, they will be kept. |
Affected Issues 06330 |
|
mod - scripts/expressions/em_javascript.js | Diff File | ||
LimeSurvey: Yii 79ae6416 2012-07-19 13:33 Details Diff |
Fixed issue 06330: Regex engine does not accept a leading zero even if explicitly specified as acceptable Dev fixed use of strlen(value) instead of value.length which caused EM unit tests to fail. |
Affected Issues 06330 |
|
mod - scripts/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-17 02:08 | danielf | New Issue | |
2012-07-17 02:08 | danielf | Status | new => assigned |
2012-07-17 02:08 | danielf | Assigned To | => TMSWhite |
2012-07-18 15:54 | TMSWhite | Changeset attached | => LimeSurvey master e60f4f74 |
2012-07-18 15:54 | TMSWhite | Note Added: 19761 | |
2012-07-18 15:54 | TMSWhite | Resolution | open => fixed |
2012-07-18 15:54 | TMSWhite | Changeset attached | => LimeSurvey Yii a5247c5f |
2012-07-18 15:54 | TMSWhite | Note Added: 19762 | |
2012-07-18 15:55 | TMSWhite | Status | assigned => resolved |
2012-07-18 15:55 | TMSWhite | Fixed in Version | => 1.92+ |
2012-07-18 16:33 | c_schmitz | Note Added: 19774 | |
2012-07-18 16:33 | c_schmitz | Status | resolved => closed |
2012-07-19 20:34 | TMSWhite | Changeset attached | => LimeSurvey Yii 79ae6416 |
2012-07-19 20:34 | TMSWhite | Note Added: 19812 |