Bug 1491658 - Author name can only contain letters from printable ASCII range
Summary: Author name can only contain letters from printable ASCII range
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: wizard
Version: develop
Hardware: All
OS: All
low
medium
Target Milestone: 25.0
Assignee: Dan Callaghan
QA Contact: Anwesha Chatterjee
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-14 11:10 UTC by Mirek Długosz
Modified: 2018-03-19 04:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-19 04:18:13 UTC
Embargoed:


Attachments (Terms of Use)
Very simple patch to solve this issue (untested) (681 bytes, patch)
2017-09-14 11:23 UTC, Mirek Długosz
no flags Details | Diff

Description Mirek Długosz 2017-09-14 11:10:39 UTC
`beaker-wizard` requires author name to consist of letters in ASCII printable range - basically, lowercase and uppercase latin letters (a-z). In 2017 there is hardly a technical reason for such limitation.

Version-Release number of selected component (if applicable):
$ beaker-wizard --version
beaker-wizard 2.3.0


How reproducible:
Always


Steps to Reproduce:
1. Run:
beaker-wizard -n 'Gęśla Jaźń' -d "Issue reproducer" -t 5m -b CoreOS/beaker-client/Interoperability/sample-test-name 1469706


Actual results:
#v+
Contacting bugzilla...
Fetching details for BZ#1469706

Author's name
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Gęśla Jaźń is not a valid author, what about Mirosław Zalewski?] 
#v-


Expected results:
Test case details are displayed for review. Names with diacritics or these not based on latin alphabet are accepted. Users are not told their real names are "not valid".

Comment 1 Mirek Długosz 2017-09-14 11:23:10 UTC
Created attachment 1325914 [details]
Very simple patch to solve this issue (untested)

Comment 2 Dan Callaghan 2017-10-23 05:47:50 UTC
I would go one step further and say there is no reason why we should be requiring that people's names be either two or three space-separated elements, either.

Possibly that is designed to catch the cause where someone's name has wrongly been guessed as their username (like "dcallagh") although if someone really wants to use that as their name, I don't see why the wizard should stop them.

However, we might have a problem one layer down, in the testinfo.desc parser. I tried putting a non-ASCII name into a task Makefile and I get:

rhts-lint testinfo.desc
testinfo.desc:1: error: "Gęśla Jaźń <dcallagh>" is not a valid Owner field (should be a valid RFC2822 name_addr, such as John Doe <jdoe>)
make: *** [testinfo.desc] Error 1

so that might need fixing too...

Comment 3 Dan Callaghan 2017-10-23 06:51:15 UTC
So, this was surprisingly hard to fully fix. :-)

https://gerrit.beaker-project.org/5885 beaker-wizard: don't enforce any restrictions on author name
https://gerrit.beaker-project.org/5884 accept non-ASCII names in testinfo.desc
https://gerrit.beaker-project.org/5886 accept non-ASCII names in testinfo.desc

Comment 4 Dan Callaghan 2017-10-23 23:28:04 UTC
The random smattering of .decode() in testinfo.py makes me nervous though. So I'm thinking I should audit that whole module for unicode-cleanliness first, and then these patches can go on top.

Bumping this to 25.0 since it's not really a minor fix.

Comment 5 Dan Callaghan 2017-11-02 07:40:30 UTC
I feel more confident now with this:

https://gerrit.beaker-project.org/5904 testinfo.py: deal exclusively in unicode not bytes
https://gerrit.beaker-project.org/5884 accept non-ASCII names in testinfo.desc

and matching changes on the Beaker side:

https://gerrit.beaker-project.org/5905 testinfo.py: deal exclusively in unicode not bytes
https://gerrit.beaker-project.org/5906 accept non-ASCII names in testinfo.desc

Although now that I think about it, the Beaker-side patches should really include a test case with a task with non-ASCII chars in the name...

Comment 7 Anwesha Chatterjee 2018-01-08 03:57:49 UTC
A test on testinfo.desc with an owner name with special characters produces this error  

> rhts-lint testinfo.desc

testinfo2.desc:1: error: "Gęśla Jaźń <bpeck>" is not a valid Owner field (should be a valid RFC2822 name_addr, such as John Doe <jdoe>)

Comment 8 Dan Callaghan 2018-01-08 04:47:12 UTC
Turns out my patch:

https://gerrit.beaker-project.org/c/5904/

was not complete. rhts-lint and rhts-mk-generate-specfile do their own file handling which is currently still dealing in bytes and not unicode.

Comment 9 Dan Callaghan 2018-01-08 05:19:59 UTC
(In reply to Dan Callaghan from comment #8)

https://gerrit.beaker-project.org/5967

Comment 10 Dan Callaghan 2018-01-08 07:38:32 UTC
This bug fix is included in rhts-4.73-1.git.4.8daecb4 which is currently available for download here:

https://beaker-project.org/yum/client-testing/

Comment 11 Anwesha Chatterjee 2018-01-09 00:33:54 UTC
Verified that 

* with beaker-client-25.0-0.git.176.b72276ac3.el6eng.noarch.rpm installed
* Running: `beaker-wizard -n 'Gęśla Jaźń'`

No longer produces the error "not a valid author", and produces a Makefile with the provided author name.

* Running: `make rpm` 
in the directory with the makefile builds successfully


and 
* Running: `rhts-lint testinfo.desc`
Does not throw any errors

Comment 12 Roman Joost 2018-03-19 04:18:13 UTC
Beaker 25.0 has been released.

Release notes are available upstream: https://beaker-project.org/docs/whats-new/release-25.html


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