Hello,
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).
Problem description:
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.
Fix:
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
browsers.
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
parameter values.
Remarks:
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 '.
Regards,
Tim
--
==========================================================================Tim
Verhoeven
Linux & Open Source Specialist
GSM : 0496 / 693 453 + e-business solutions
Email : dj@4ict.com + consulting
URL : www.sin.khk.be/~dj/ + Server consolidation
==========================================================================--------------
next part --------------
185c185
< printf("<input type=text size=40 name=\"parm_%s\"
value=\"%s\">",
---> printf("<input type=text size=40 name=\"parm_%s\"
value=\'%s\'>",
Steve Langasek
2002-Apr-24 07:07 UTC
[Samba] Re: [PATCH] Display of quoted parameters in Swat
Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20020424/d11494a1/attachment.bin