Bug 865869 - f18b tc3 anaconda DATE&TIME Improve NTP servers list validation (currently it does accept junk)
Summary: f18b tc3 anaconda DATE&TIME Improve NTP servers list validation (currently it...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vratislav Podzimek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-12 17:07 UTC by Reartes Guillermo
Modified: 2012-12-06 07:28 UTC (History)
4 users (show)

Fixed In Version: anaconda-18.35-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-06 07:28:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
exaple of entered 'junk' ntp servers (238.41 KB, image/png)
2012-10-12 17:07 UTC, Reartes Guillermo
no flags Details
got stuck after accepting previous entries (50.11 KB, image/png)
2012-10-12 17:09 UTC, Reartes Guillermo
no flags Details
[anaconda-18.29-1] screenshot showing black rectangle instead of NTP server configuration dialog (118.83 KB, image/png)
2012-11-14 16:38 UTC, Steve Tyler
no flags Details

Description Reartes Guillermo 2012-10-12 17:07:05 UTC
Created attachment 626131 [details]
exaple of entered 'junk' ntp servers

Description of problem:

You can setup junk ntp servers. Some form of improved input validation seems  to be needed.

For example, one can set a % as an npt server. One can also set a ' ' single space as an ntp server, and a '  ' double space, '   ' triple space, etc as an ntp server. it does not look good (and i am afraid that i won't work).

Version-Release number of selected component (if applicable):
F18b  tc3

How reproducible:
always

Steps to Reproduce:
1. goto date and time, enter new ntp servers with junk data
  
Actual results:
it seems to validate only again duplicated entries.

Expected results:
better validation

Additional info:

Comment 1 Reartes Guillermo 2012-10-12 17:09:57 UTC
Created attachment 626133 [details]
got stuck after accepting previous entries

anaconda got stuck

Comment 2 Reartes Guillermo 2012-10-12 17:10:48 UTC
After some time in that state it returned to the map. 
So, and the junk hostnames remained.

Comment 3 Steve Tyler 2012-11-14 16:38:30 UTC
Created attachment 644983 [details]
[anaconda-18.29-1] screenshot showing black rectangle instead of NTP server configuration dialog

I had this already written up as a new bug before I discovered that Reartes had filed this bug ...

Description of problem:
In the Date & Time spoke, if a very long NTP server name is added, the NTP server configuration dialog is replaced by a black rectangle. See attached screenshot.

Version-Release number of selected component (if applicable):
anaconda-18.29-1
Fedora-18-Beta-TC8-x86_64-Live-Desktop.iso

How reproducible:
Always.

Steps to Reproduce:
1. Accept English as install language.
2. Click Date & Time.
3. Click gear icon to display NTP server configuration dialog.
4. In the server name text box, hold the 'x' key for about 60 seconds.
5. Click '+' button.
  
Actual results:

Black rectangle (see attached screenshot).
Cannot return to Date & Time spoke by clicking or by pressing enter.
Can return to Date & Time spoke by pressing escape.

There appears to one white pixel at the upper left corner of the black rectangle.

Expected results:
NTP server configuration dialog is displayed.

Additional info:

Tested with:
$ qemu-kvm -m 2048 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC8/Fedora-18-Beta-TC8-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse

Comment 4 Steve Tyler 2012-11-14 16:57:48 UTC
If you enter '中文 (台湾)' as an NTP server name, you get a traceback while writing the kickstart file:

Bug 876293 - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 56: ordinal not in range(128)

Comment 5 Vratislav Podzimek 2012-11-29 14:34:19 UTC
Patch for checking if given string is a valid hostname posted to anaconda-patches.

Comment 6 Steve Tyler 2012-11-29 18:09:50 UTC
[master] Check NTP servers for validity
https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-November/002243.html

Thanks.

Comment 7 Vratislav Podzimek 2012-12-03 16:10:58 UTC
(In reply to comment #5)
> Patch for checking if given string is a valid hostname posted to
> anaconda-patches.
Pushed.

Comment 8 Fedora Update System 2012-12-05 00:56:35 UTC
pykickstart-1.99.22-1.fc18, anaconda-18.35-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-19380/pykickstart-1.99.22-1.fc18,anaconda-18.35-1.fc18

Comment 9 Fedora Update System 2012-12-05 23:12:40 UTC
Package pykickstart-1.99.22-1.fc18, anaconda-18.35-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pykickstart-1.99.22-1.fc18 anaconda-18.35-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-19380/pykickstart-1.99.22-1.fc18,anaconda-18.35-1.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-12-06 07:28:33 UTC
pykickstart-1.99.22-1.fc18, anaconda-18.35-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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