Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 08:41
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
network-wizard fails: illegal string in gtkdialog3 script
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
repos

Joined: 14 Oct 2011
Posts: 1

PostPosted: Fri 14 Oct 2011, 08:54    Post subject:  network-wizard fails: illegal string in gtkdialog3 script
Subject description: net-setup.sh: problem with devices whose MANUFACTURER string contains '<'
 

Platform:
Dell Inspiron mini 1012
Puppy version: 511
/usr/sbin/net-setup.sh version: 25feb10

Symptom:
network-wizard fails silently!!!

Problem:
For some strange reason the kernel prepends "<A" to USB device''s smanufacturer string on this netbook

$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/manufacturer
<ADell Wireless 5540
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/product
Dell Wireless 5540

(the "A<" prefix isn't a typo)


The function findInterfaceInfo() in net-setup.sh picks up the string, fails to sanitize it and blindly sets the MANU variable accordingly.

The (dynamic) gtkdialog3 script fails miserably (as '<' is used as its tag deliniter) and network-wizard exits, unable to tell the user what happened.

Solution:
The function findInterfaceInfo() in net-setup.sh should filter out '<', '>' and other gtkdialog3's special characters for the PROC/MANU/INFO strings.

Suggested fix:

Add the following before findInterfaceInfo() returns:

Code:

# if PROD / MANU / INFO contain the < or > characters, the produced gtkdialog3
# script will fail; so remove these dangerous characters
PROD=$(echo "$PROD"|tr -d '<>')
MANU=$(echo "$MANU"|tr -d '<>')
INFO=$(echo "$INFO"|tr -d '<>')



Thanks to all who contribute to puppy linux.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7082
Location: Perth, Western Australia

PostPosted: Fri 14 Oct 2011, 19:51    Post subject:  

Well, we could strip out all strange characters:

echo 'this is a (typical) <description>. |}[(*&%$#!' | sed -e 's%[^a-zA-Z0-9 .]%%g'

The net-setup package is in the 'common' repo. I will put this fix into it.
Thanks for the feedback.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7082
Location: Perth, Western Australia

PostPosted: Fri 14 Oct 2011, 20:11    Post subject:  

fixed PET:

http://bkhome.org/blog/?viewDetailed=02544

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0469s ][ Queries: 11 (0.0039s) ][ GZIP on ]