Ignore:
Timestamp:
Mar 17, 2009, 9:50:20 PM (13 years ago)
Author:
livings124
Message:

#1276 encrypt the password to access web client interface using SHA-2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r7914 r8072  
    3030#include "transmission.h"
    3131#include "bencode.h"
     32#include "crypto.h"
    3233#include "list.h"
    3334#include "platform.h"
     
    314315        if( errno )
    315316        {
    316             send_simple_response( req, HTTP_NOTFOUND, NULL );
     317            send_simple_response( req, HTTP_NOTFOUND, filename );
    317318        }
    318319        else
     
    465466                user = p;
    466467                *pass++ = '\0';
     468                pass = tr_crypt( pass );
    467469            }
    468470        }
     
    507509        else
    508510        {
    509             send_simple_response( req, HTTP_NOTFOUND, NULL );
    510         }
    511 
     511            send_simple_response( req, HTTP_NOTFOUND, req->uri );
     512        }
     513
     514        tr_free( pass );
    512515        tr_free( user );
    513516    }
     
    669672{
    670673    tr_free( server->password );
    671     server->password = tr_strdup( password );
     674    server->password = tr_crypt( password );
    672675    dbgmsg( "setting our Password to [%s]", server->password );
    673676}
Note: See TracChangeset for help on using the changeset viewer.