[PATCH] Display of quoted parameters in Swat
dj at 4ict.com
dj at 4ict.com
Wed Apr 24 01:36:02 GMT 2002
There is a problem with Swat and it's handling of quoted strings. I've
tested this on the latest released version of Samba (2.2.3a).
When you put quoted strings into the smb.conf file they are not displayed
in swat. For example : valid users = @"DOM+Domain Users" in smb.conf will
result in @ in swat.
The reason for this is that the in the html form created by swat the value
of the form item (textfield) is also quoted using ". So the result, for
example value="@"DOM+Domain Users"" is wrongly parsed by the browsers.
I replaced the " quotes in the swat code with ' quotes, the resulting html
now is value='@"DOM+Domain Users"' and is correctly parsed by the
I've tested this on Linux with Mozilla 0.9.9, Netscape 4.7 and KDE4s 2.2
Konquerer. And on Windows 2K Prof with Mozilla 0.9.9 and IE (5.5 I think).
They all worked fine in displaying and editing quoted and non-quoted
When ' is used to quote parameters values this fix won't work ofcourse. So
either we add to the smb.conf documentation that " is the only legal
character to quote and test this. Or we add extra code to swat that parses
quote characters from smb.conf to html coded chars ("e;) and back, but
i haven't had a change to test if this would work.
As stated, the diff included is against the 2.2.3a sourcecode, and is for
the source/web/swat.c file. Or the fix could be done manually by changing
the " character to '.
Linux & Open Source Specialist
GSM : 0496 / 693 453 + e-business solutions
Email : dj at 4ict.com + consulting
URL : www.sin.khk.be/~dj/ + Server consolidation
-------------- next part --------------
< printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
> printf("<input type=text size=40 name=\"parm_%s\" value=\'%s\'>",
More information about the samba-technical