httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r613685 - in /httpd/mod_ftp/trunk: include/mod_ftp.h modules/ftp/ftp_commands.c modules/ftp/ftp_protocol.h modules/ftp/ftp_util.c
Date Sun, 20 Jan 2008 21:50:33 GMT
Author: wrowe
Date: Sun Jan 20 13:50:31 2008
New Revision: 613685

URL: http://svn.apache.org/viewvc?rev=613685&view=rev
Log:
Revert breakage from auth refactoring, and set Authorization
header appropriately, and never fill in headers when user is
still the 'unknown' reserved value.


Modified:
    httpd/mod_ftp/trunk/include/mod_ftp.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
    httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h
    httpd/mod_ftp/trunk/modules/ftp/ftp_util.c

Modified: httpd/mod_ftp/trunk/include/mod_ftp.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/include/mod_ftp.h?rev=613685&r1=613684&r2=613685&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/include/mod_ftp.h (original)
+++ httpd/mod_ftp/trunk/include/mod_ftp.h Sun Jan 20 13:50:31 2008
@@ -231,7 +231,7 @@
     apr_off_t size; 
     apr_off_t csize;
     apr_int32_t  nlink;
-    struct ftp_direntry *child; /* For decending */
+    struct ftp_direntry *child; /* For descending */
     struct ftp_direntry *next;
 };
 

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c?rev=613685&r1=613684&r2=613685&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_commands.c Sun Jan 20 13:50:31 2008
@@ -1360,6 +1360,7 @@
     apr_sleep(fc->login_attempts * APR_USEC_PER_SEC);
 
     fc->user = ftp_unknown_username;
+    fc->authorization = NULL;
     fc->response_notes = apr_pstrdup(r->pool,
                                      "Please log in with USER and PASS");
     return FTP_REPLY_NOT_LOGGED_IN;
@@ -2760,6 +2761,7 @@
     {
         r->hostname = fc->host = NULL;
         fc->user = ftp_unknown_username;
+        fc->authorization = NULL;
         r->server = fc->orig_server = c->base_server;
         r->per_dir_config = r->server->lookup_defaults;
         fc->response_notes = apr_pstrdup(r->pool,

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h?rev=613685&r1=613684&r2=613685&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_protocol.h Sun Jan 20 13:50:31 2008
@@ -6,7 +6,7 @@
  * another gmake (or a make ftp_protocol.h)
  *
  * Generated from ../.. on 
- * Sun Jan 20 06:46:42 2008
+ * Sun Jan 20 21:20:32 2008
  */
 
 

Modified: httpd/mod_ftp/trunk/modules/ftp/ftp_util.c
URL: http://svn.apache.org/viewvc/httpd/mod_ftp/trunk/modules/ftp/ftp_util.c?rev=613685&r1=613684&r2=613685&view=diff
==============================================================================
--- httpd/mod_ftp/trunk/modules/ftp/ftp_util.c (original)
+++ httpd/mod_ftp/trunk/modules/ftp/ftp_util.c Sun Jan 20 13:50:31 2008
@@ -417,10 +417,12 @@
 void ftp_set_authorization(request_rec *r)
 {
     ftp_connection *fc = ftp_get_module_config(r->connection->conn_config);
+    if (r->user == ftp_unknown_username)
+        return;
     r->hostname = apr_pstrdup(r->pool, fc->host);
     r->user = apr_pstrdup(r->pool, fc->user);
     apr_table_setn(r->headers_in, "Host", r->hostname);
-    apr_table_setn(r->headers_in, "Authorization", r->user);
+    apr_table_setn(r->headers_in, "Authorization", fc->authorization);
 }
 
 /* ftp_set_uri: Setup r->uri based on a file argument and user's 



Mime
View raw message