-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
scriptler:2.10
On the script creation page, the value of the Id is not verified. If you put something like "<" or any other character that are not allowed as filename, you receive an exception stack.
Two solutions:
- either convert the characters that are not valid to "_" (better solution from UX PoV)
- or warn the users and ask another Id.
Take care of the filename that are not valid under Windows like "con", cf. SO question.
The method fixFileName starts the work (with spaces) but is not exhaustive.
[JENKINS-48688] Check the Id value (as filename) when creating a script
Description |
Original:
On the script creation page, the value of the Id is not verified. If you put something like "<" or any other character that are not allowed as filename, you receive an exception stack. Two solutions: - either convert the characters that are not valid to "_" (better solution from UX PoV) - or warn the users and ask another Id. Take care of the filename that are not valid under Windows like "con", cf. [SO question|https://stackoverflow.com/questions/6730009/validate-a-file-name-on-windows]. |
New:
On the script creation page, the value of the Id is not verified. If you put something like "<" or any other character that are not allowed as filename, you receive an exception stack. Two solutions: - either convert the characters that are not valid to "_" (better solution from UX PoV) - or warn the users and ask another Id. Take care of the filename that are not valid under Windows like "con", cf. [SO question|https://stackoverflow.com/questions/6730009/validate-a-file-name-on-windows]. The method {{fixFileName}} starts the work (with spaces) but is not exhaustive. One of the "easy" way to avoid the exception is to put a try/catch around {{Writer writer = new FileWriter(newScriptFile);}} line. |
Description |
Original:
On the script creation page, the value of the Id is not verified. If you put something like "<" or any other character that are not allowed as filename, you receive an exception stack. Two solutions: - either convert the characters that are not valid to "_" (better solution from UX PoV) - or warn the users and ask another Id. Take care of the filename that are not valid under Windows like "con", cf. [SO question|https://stackoverflow.com/questions/6730009/validate-a-file-name-on-windows]. The method {{fixFileName}} starts the work (with spaces) but is not exhaustive. One of the "easy" way to avoid the exception is to put a try/catch around {{Writer writer = new FileWriter(newScriptFile);}} line. |
New:
On the script creation page, the value of the Id is not verified. If you put something like "<" or any other character that are not allowed as filename, you receive an exception stack. Two solutions: - either convert the characters that are not valid to "_" (better solution from UX PoV) - or warn the users and ask another Id. Take care of the filename that are not valid under Windows like "con", cf. [SO question|https://stackoverflow.com/questions/6730009/validate-a-file-name-on-windows]. The method {{fixFileName}} starts the work (with spaces) but is not exhaustive. |