Bug 923462 - Check for special characters in release name
Summary: Check for special characters in release name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-release
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-19 22:33 UTC by Matthew Garrett
Modified: 2013-11-14 04:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-14 04:45:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for fedora-release spec (444 bytes, patch)
2013-03-19 22:33 UTC, Matthew Garrett
no flags Details | Diff

Description Matthew Garrett 2013-03-19 22:33:48 UTC
Created attachment 712978 [details]
Patch for fedora-release spec

fedora-release shouldn't contain special characters. Check for a bunch of them during build and abort if they're there.

Comment 1 Dennis Gilmore 2013-03-23 00:55:57 UTC
im not going to apply this patch

Comment 2 Matthew Garrett 2013-03-23 05:09:33 UTC
Why not? Including any of these characters would be an error, and guarding against them being accidentally included in the release seems worthwhile.

Comment 3 Peter Jones 2013-03-27 19:09:09 UTC
<t8m> #agreed Release name must not contain any shell metacharacters. (+5, -3, 0:1)

So since we've agreed to not allow these, this is a reasonable check we should include in the build process.

Comment 4 Till Maas 2013-03-28 08:49:35 UTC
(In reply to comment #3)
> <t8m> #agreed Release name must not contain any shell metacharacters. (+5,
> -3, 0:1)
> 
> So since we've agreed to not allow these, this is a reasonable check we
> should include in the build process.

Since it is a check, it belongs to %check and not %build.

Also the check is missing other metacharacters such as space or tab. And there seem to be characters included that are no metacharacters at least wrt parameter expansion, such as ^, :, %, @ and =. IMHO the the naming guideline should therefore explicitly state which characters are forbidden and then the list should be used to create a proper check. According to bash(1) even ' is not a metacharacter:
DEFINITIONS
[...]
       metacharacter
              A character that, when unquoted, separates words.  One of the following:
              |  & ; ( ) < > space tab



And the message in the check should clearly say that an error occured.

Comment 5 Peter Jones 2013-04-02 18:25:49 UTC
Well, it seems we've been slightly less strict in our use of the word of "metacharacters" than we should have been.  Space and tab are clearly okay, and single or double quotes clearly aren't.

So the language we agreed on is unfortunate, to be sure :(

Comment 6 Susi Lehtola 2013-07-15 11:45:08 UTC
Hmm, so what's the conclusion for the Fedora 19 release name? Now /etc/issue is
 Schrödinger’s Cat
which doesn't display correctly in the console. If you change the ’ to a ', it works.

Comment 7 Fedora End Of Life 2013-09-16 16:38:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 8 Dennis Gilmore 2013-11-14 04:45:16 UTC
Patch has been applied awhile ago, cleaning up the bug report


Note You need to log in before you can comment on or make changes to this bug.