Bug 334083 - passwords with " are not accepted
Summary: passwords with " are not accepted
Status: RESOLVED FIXED
Alias: None
Product: kdesu
Classification: Applications
Component: kdesud (show other bugs)
Version: 1.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdesu bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-29 13:48 UTC by Marcus Meissner
Modified: 2014-05-12 23:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-04-29 13:48:19 UTC
If the root password contains a " it is not understood by kdesud.

kdelibs/kdesu/client.cpp escapes it correctly

so    foobar"      turns into    "foobar\""
but the lexer.cpp in kdesud then chokes on that (returns Tok_none instead of Tok_string).


Reproducible: Always

Steps to Reproduce:
1. use rootpassword with " in it
2. try kdesu xterm 
3. fail
Actual Results:  
does not do anything

kdesud(22412) ConnectionHandler::doCommand: Parse error 

in .xession-errors

Expected Results:  
should open root xterm

https://bugzilla.novell.com/show_bug.cgi?id=837959
Comment 1 Christoph Feck 2014-04-29 22:09:54 UTC
Proposed patch:

diff --git a/kdesu/kdesud/lexer.cpp b/kdesu/kdesud/lexer.cpp
index f2c5db8..fecbb57 100644
--- a/kdesu/kdesud/lexer.cpp
+++ b/kdesu/kdesud/lexer.cpp
@@ -75,7 +75,7 @@ int Lexer::lex()
                // handle escaped characters
                if (c == '\\') {
                    c = m_Input[in++];
-                   if ((c == '"') || iscntrl(c))
+                   if (iscntrl(c))
                        return Tok_none;
                    if (c == '^') {
                        c = m_Input[in++];
Comment 2 Christoph Feck 2014-05-08 21:32:38 UTC
https://git.reviewboard.kde.org/r/118058/
Comment 3 Christoph Feck 2014-05-12 22:09:59 UTC
Git commit b013884675e8b21546466919a6a73df6a36a3555 by Christoph Feck.
Committed on 12/05/2014 at 22:07.
Pushed by cfeck into branch 'KDE/4.13'.

Allow quotation marks in passwords
FIXED-IN: 4.13.2
REVIEW: 118058

M  +1    -1    kdesu/kdesud/lexer.cpp

http://commits.kde.org/kde-runtime/b013884675e8b21546466919a6a73df6a36a3555