View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0012962 | CDash | (No Category) | public | 2012-02-13 22:30 | 2012-02-14 03:25 |
|
Reporter | Peter Colberg | |
Assigned To | Julien Jomier | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | |
Platform | GNU/Linux | OS | Debian | OS Version | 6.0 (squeeze) |
Product Version | 2.0 | |
Target Version | | Fixed in Version | 2.0 | |
|
Summary | 0012962: Invalid regex prevents spaces in project name |
Description | CDash is capable of supporting spaces in project names (using verbatim spaces when creating the project, and HTML-encoded spaces when submitting with CTest). However, the regular expression in createProject.php is faulty, and consequently strips spaces from the name of newly created projects.
The attached patch resolves the issue. |
Steps To Reproduce | 1. Navigate to Create new project form
2. Enter project name with spaces
3. Create project
3. CDash stripped spaces from project name |
Tags | No tags attached. |
|
Attached Files | cdash_fix_spaces_in_project_name.patch [^] (546 bytes) 2012-02-13 22:30 [Show Content] [Hide Content]Index: cdash/createProject.php
===================================================================
--- cdash.orig/createProject.php 2012-01-20 22:04:16.000000000 -0500
+++ cdash/createProject.php 2012-01-20 22:46:50.820428312 -0500
@@ -117,7 +117,7 @@
{
// Remove any slashes, etc...
$Name = stripslashes_if_gpc_magic_quotes($_POST["name"]);
- $Name = preg_replace("/[^a-zA-Z0-9s+-.]/", "",$Name);
+ $Name = preg_replace("/[^a-zA-Z0-9\s+-.]/", "",$Name);
// Check that the name are different
if(!$Project->ExistsByName($Name))
|
|