[WebSVN issue] [Issue 257] New - Empty password not handled properly

View: New views
3 Messages — Rating Filter:   Alert me  

[WebSVN issue] [Issue 257] New - Empty password not handled properly

by piotr_tarnowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=257
                 Issue #|257
                 Summary|Empty password not handled properly
               Component|websvn
                 Version|trunk
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|Subversion
             Assigned to|issues@websvn
             Reported by|piotr_tarnowski






------- Additional comments from piotr_tarnowski@... Thu Oct  8 03:54:28 -0700 2009 -------
When repository requests user name but no password generated command is not
correct (path takes place of password).


Index: include/configclass.php
===================================================================
--- include/configclass.php (wersja 446)
+++ include/configclass.php (working copy)
@@ -262,11 +262,9 @@
   // {{{ svnParams
 
   function svnParams() {
-    if (!empty($this->username)) {
-      return " --username ".$this->username." --password ".$this->password." ";
-    }
-
-    return " ";
+    if(empty($this->username)) return " ";
+    return " --username ".quote($this->username)." --password ".
+        (empty($this->password) ? "''" : quote($this->password))." ";
   }
 
   // }}}

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2404902

[WebSVN issue] [Issue 257] Empty password not handled properly

by Quinn Taylor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=257



User quinntaylor changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from quinntaylor@... Thu Oct  8 10:51:25 -0700 2009 -------
An excellent catch! I'd never looked at that code, and the problem is obvious. I've applied a modified
version of your patch in revision 946. It only adds the --username or --password flags (with the
matching argument) if they are specified, and includes the quotes around the username and password,
which is a great addition, too.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2405214

[WebSVN issue] [Issue 257] Empty password not handled properly

by Dirk Thomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://websvn.tigris.org/issues/show_bug.cgi?id=257



User dirkthomas changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|RESOLVED                  |CLOSED
--------------------------------------------------------------------------------




------- Additional comments from dirkthomas@... Thu Nov 19 10:56:44 -0800 2009 -------
Closing issue.

------------------------------------------------------
http://websvn.tigris.org/ds/viewMessage.do?dsForumId=2390&dsMessageId=2420169