Ticket #1480: CustomAnonPwd.patch

File CustomAnonPwd.patch, 14.0 KB (added by eyebex, 15 years ago)

Custom anonymous password patch

  • source/FileZilla.rc

    RCS file: /cvsroot/filezilla/FileZilla/source/FileZilla.rc,v
    retrieving revision 1.205
    diff -u -r1.205 FileZilla.rc
     
    177177                    ES_AUTOHSCROLL
    178178END
    179179
    180 IDD_CONNECTION2 DIALOGEX 0, 0, 286, 208
     180IDD_CONNECTION2 DIALOGEX 0, 0, 284, 212
    181181STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
    182182FONT 8, "MS Shell Dlg", 0, 0, 0x0
    183183BEGIN
    184     GROUPBOX        "Keep Alive Settings",IDC_STATIC,7,6,272,62
     184    GROUPBOX        "Keep Alive Settings",IDC_STATIC,6,42,270,62
    185185    CONTROL         "&Enable the Keep Alive system",IDC_CHECK1,"Button",
    186                     BS_AUTOCHECKBOX | WS_TABSTOP,13,18,109,10
     186                    BS_AUTOCHECKBOX | WS_TABSTOP,12,54,109,10
    187187    LTEXT           "Send Keep Alive commands like ""PWD"", ""REST 0"", ""TYPE A"", ""TYPE I"" at random intervals between",
    188                     IDC_STATIC,13,32,223,17
    189     EDITTEXT        IDC_INTERVALLOW,16,50,24,14,ES_AUTOHSCROLL
    190     LTEXT           "and",IDC_STATIC,44,53,13,8
    191     EDITTEXT        IDC_INTERVALHIGH,61,50,23,14,ES_AUTOHSCROLL
    192     LTEXT           "seconds.",IDC_STATIC,89,53,30,8
    193     GROUPBOX        "&Timeout Detection",IDC_STATIC,7,73,272,40
    194     LTEXT           "If zero bytes are transferred within",IDC_STATIC,14,85,
    195                     114,8
    196     EDITTEXT        IDC_TIMEOUT,129,81,26,14,ES_AUTOHSCROLL
    197     LTEXT           "seconds,",IDC_STATIC,159,84,30,8
     188                    IDC_STATIC,24,66,223,17
     189    EDITTEXT        IDC_INTERVALLOW,24,84,24,14,ES_AUTOHSCROLL
     190    LTEXT           "and",IDC_STATIC,54,87,13,8
     191    EDITTEXT        IDC_INTERVALHIGH,72,84,23,14,ES_AUTOHSCROLL
     192    LTEXT           "seconds.",IDC_STATIC,102,87,30,8
     193    GROUPBOX        "&Timeout Detection",IDC_STATIC,6,108,270,36
     194    LTEXT           "If zero bytes are transfered within",IDC_STATIC,12,120,
     195                    113,8
     196    EDITTEXT        IDC_TIMEOUT,126,117,26,14,ES_AUTOHSCROLL
     197    LTEXT           "seconds,",IDC_STATIC,156,120,30,8
    198198    LTEXT           "assume that the connection timed out and disconnect.",
    199                     IDC_STATIC,14,96,172,8
    200     GROUPBOX        "Retry Settings",IDC_STATIC,7,124,272,58
     199                    IDC_STATIC,12,132,173,8
     200    GROUPBOX        "Retry Settings",IDC_STATIC,6,150,272,44
    201201    LTEXT           "When disconnected from server during transfer, wait ",
    202                     IDC_STATIC,13,137,234,8
    203     EDITTEXT        IDC_DELAY,15,147,17,14,ES_AUTOHSCROLL
     202                    IDC_STATIC,12,162,174,8
     203    EDITTEXT        IDC_DELAY,12,174,17,14,ES_AUTOHSCROLL
    204204    LTEXT           "seconds between login attempts and try again up to",
    205                     IDC_STATIC,38,150,168,8
    206     EDITTEXT        IDC_NUMRETRY,207,147,20,14,ES_AUTOHSCROLL
    207     LTEXT           "times",IDC_STATIC,231,150,17,8
     205                    IDC_STATIC,36,177,168,8
     206    EDITTEXT        IDC_NUMRETRY,210,174,20,14,ES_AUTOHSCROLL
     207    LTEXT           "times.",IDC_STATIC,234,177,18,8
    208208    CONTROL         "Enable IPv6 support (works only under Windows XP / 2003 Server or newer)",
    209209                    IDC_OPTIONS_CONNECTION2_ENABLEIPV6,"Button",
    210                     BS_AUTOCHECKBOX | WS_TABSTOP,7,189,260,10
     210                    BS_AUTOCHECKBOX | WS_TABSTOP,6,198,260,10
     211    GROUPBOX        "Default Anonymous Password",IDC_STATIC,6,6,270,30
     212    EDITTEXT        IDC_ANONPWD,12,18,258,12,ES_AUTOHSCROLL
    211213END
    212214
    213215IDD_ENTERSOMETHING DIALOG  0, 0, 186, 68
  • source/FtpControlSocket.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/FtpControlSocket.cpp,v
    retrieving revision 1.117
    diff -u -r1.117 FtpControlSocket.cpp
     
    685685                return;
    686686            }
    687687        }
    688         else if ((i == 1 || i == 11) && (m_CurrentServer.pass == "anon@" || m_CurrentServer.pass == ""))
     688        else if ((i == 1 || i == 11) && (m_CurrentServer.pass == COptions::GetOption(OPTION_ANONPWD) || m_CurrentServer.pass == ""))
    689689        {
    690690            CGssNeedPassRequestData *pData=new CGssNeedPassRequestData;
    691691            pData->nRequestID=m_pOwner->GetNextAsyncRequestID();
  • source/MainFrm.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/MainFrm.cpp,v
    retrieving revision 1.196
    diff -u -r1.196 MainFrm.cpp
     
    22962296        if (!bUseGSS)
    22972297        {
    22982298            server.user="anonymous";
    2299             server.pass="anon@";
     2299            server.pass=COptions::GetOption(OPTION_ANONPWD);
    23002300        }
    23012301        else
    23022302        {
     
    39713971    if (site.nLogonType == 0)
    39723972    {
    39733973        User = "anonymous";
    3974         Pass = "anon@";
     3974        Pass = COptions::GetOption(OPTION_ANONPWD);
    39753975    }
    39763976
    39773977    if (Host=="")
     
    40584058    if (User == "")
    40594059    {
    40604060        User="anonymous";
    4061         Pass="anon@";
     4061        Pass=COptions::GetOption(OPTION_ANONPWD);
    40624062    }
    40634063
    40644064    t_server server;
     
    44534453        if (!bUseGSS)
    44544454        {
    44554455            m_User="anonymous";
    4456             m_Pass="anon@";
     4456            m_Pass=COptions::GetOption(OPTION_ANONPWD);
    44574457        }
    44584458        else
    44594459        {
  • source/ManualTransferDlg.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/ManualTransferDlg.cpp,v
    retrieving revision 1.8
    diff -u -r1.8 ManualTransferDlg.cpp
     
    325325        else
    326326        {
    327327            m_Transferfile.server.user="anonymous";
    328             m_Transferfile.server.pass="anon@";
     328            m_Transferfile.server.pass=COptions::GetOption(OPTION_ANONPWD);
    329329        }
    330330
    331331        switch (m_ServerType.GetCurSel())
  • source/Options.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/Options.cpp,v
    retrieving revision 1.113
    diff -u -r1.113 Options.cpp
     
    9393        AddPage(m_OptionsLoggingPage, IDS_OPTIONSPAGE_LOGGING, &m_OptionsInterfacePage);
    9494    AddPage(m_OptionsDebugPage, IDS_OPTIONSPAGE_DEBUG);
    9595
    96 
    9796    SetConstantText("FileZilla");
    9897
    9998    m_OptionsFtpProxyPage.m_logontype=GetOptionVal(OPTION_LOGONTYPE);
     
    102101    m_OptionsFtpProxyPage.m_fwuser=GetOption(OPTION_FWUSER);
    103102    m_OptionsFtpProxyPage.m_fwpass=CCrypt::decrypt(GetOption(OPTION_FWPASS));
    104103    m_OptionsPage2.m_Timeout=GetOptionVal(OPTION_TIMEOUTLENGTH);
     104    m_OptionsPage2.m_AnonPwd=GetOption(OPTION_ANONPWD);
    105105    m_OptionsPage2.m_UseKeepAlive=GetOptionVal(OPTION_KEEPALIVE);
    106106    m_OptionsPage2.m_IntervalLow.Format(_T("%d"), GetOptionVal(OPTION_INTERVALLOW));
    107107    m_OptionsPage2.m_IntervalHigh.Format(_T("%d"), GetOptionVal(OPTION_INTERVALHIGH));
     
    245245    m_OptionsTransferCompressionPage.m_useCompression = GetOptionVal(OPTION_MODEZ_USE);
    246246
    247247    InitLanguagePage();
     248
    248249    //Show the dialog
    249250    BOOL res = DoModal();
    250251    if (res != IDOK)
     
    256257    SetOption(OPTION_FWUSER,m_OptionsFtpProxyPage.m_fwuser);
    257258    SetOption(OPTION_FWPASS,CCrypt::encrypt(m_OptionsFtpProxyPage.m_fwpass));
    258259    SetOption(OPTION_TIMEOUTLENGTH,m_OptionsPage2.m_Timeout);
     260
     261    SetOption(OPTION_ANONPWD,m_OptionsPage2.m_AnonPwd);
    259262    SetOption(OPTION_KEEPALIVE,m_OptionsPage2.m_UseKeepAlive);
    260263
    261264    if (m_OptionsPage2.m_UseKeepAlive)
     
    678681            res = "mit.edu;";
    679682        else if (nOptionID == OPTION_IDENTSYSTEM)
    680683            res = _T("UNIX");
     684        else if (nOptionID == OPTION_ANONPWD)
     685            res = _T("anon@");
    681686    }
    682687    if (!m_OptionsCache[nOptionID-1].bCached)
    683688    {
  • source/Options.h

    RCS file: /cvsroot/filezilla/FileZilla/source/Options.h,v
    retrieving revision 1.66
    diff -u -r1.66 Options.h
     
    2222#if _MSC_VER > 1000
    2323#pragma once
    2424#endif // _MSC_VER > 1000
    25 // Options.h : Header-Datei
    26 //
    2725
    2826#include "FzApiStructures.h"
    2927#include "SpeedLimit.h"
     
    5250
    5351#include "misc\MarkupSTL.h"
    5452
    55 #define OPTIONS_NUM 116
     53#define OPTIONS_NUM 117
    5654
    5755/////////////////////////////////////////////////////////////////////////////
    5856// Dialogfeld COptions
     
    281279#define OPTION_LOGTIMESTAMPS 114
    282280#define OPTION_VMSALLREVISIONS 115
    283281#define OPTION_LASTSERVERUTF8 116
     282#define OPTION_ANONPWD 117
    284283
    285284//{{AFX_INSERT_LOCATION}}
    286285// Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein.
  • source/OptionsConnection2.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/OptionsConnection2.cpp,v
    retrieving revision 1.6
    diff -u -r1.6 OptionsConnection2.cpp
     
    2929, m_bEnableIPV6(FALSE)
    3030{
    3131    //{{AFX_DATA_INIT(COptionsConnection2)
    32     m_Timeout = 0;
    3332    m_UseKeepAlive = FALSE;
    34     m_IntervalHigh = _T("");
    3533    m_IntervalLow = _T("");
     34    m_IntervalHigh = _T("");
     35    m_Timeout = 0;
    3636    m_Delay = _T("");
    3737    m_NumRetries = _T("");
    3838    //}}AFX_DATA_INIT
     
    4646{
    4747    CSAPrefsSubDlg::DoDataExchange(pDX);
    4848    //{{AFX_DATA_MAP(COptionsConnection2)
     49    DDX_Control(pDX, IDC_ANONPWD, m_AnonPwdCtrl);
     50    DDX_Text(pDX, IDC_ANONPWD, m_AnonPwd);
     51
     52    DDX_Check(pDX, IDC_CHECK1, m_UseKeepAlive);
     53
    4954    DDX_Control(pDX, IDC_INTERVALLOW, m_IntervalLowCtrl);
     55    DDX_Text(pDX, IDC_INTERVALLOW, m_IntervalLow);
     56
    5057    DDX_Control(pDX, IDC_INTERVALHIGH, m_IntervalHighCtrl);
    51     DDX_Text(pDX, IDC_TIMEOUT, m_Timeout);
    52     DDX_Check(pDX, IDC_CHECK1, m_UseKeepAlive);
    5358    DDX_Text(pDX, IDC_INTERVALHIGH, m_IntervalHigh);
    54     DDX_Text(pDX, IDC_INTERVALLOW, m_IntervalLow);
     59
     60    DDX_Text(pDX, IDC_TIMEOUT, m_Timeout);
     61
    5562    DDX_Text(pDX, IDC_DELAY, m_Delay);
    5663    DDX_Text(pDX, IDC_NUMRETRY, m_NumRetries);
    5764    //}}AFX_DATA_MAP
     65
    5866    DDX_Check(pDX, IDC_OPTIONS_CONNECTION2_ENABLEIPV6, m_bEnableIPV6);
    5967}
    6068
    61 
    6269BEGIN_MESSAGE_MAP(COptionsConnection2, CSAPrefsSubDlg)
    6370    //{{AFX_MSG_MAP(COptionsConnection2)
    64     ON_BN_CLICKED(IDC_CHECK1, OnCheck1)
     71    ON_BN_CLICKED(IDC_CHECK1, OnCheckKeepAlive)
    6572    ON_WM_CLOSE()
    6673    //}}AFX_MSG_MAP
    6774END_MESSAGE_MAP()
    6875
    69 void COptionsConnection2::OnCheck1()
     76BOOL COptionsConnection2::OnInitDialog()
    7077{
    71     UpdateData(TRUE);
     78    CSAPrefsSubDlg::OnInitDialog();
     79
    7280    m_IntervalHighCtrl.EnableWindow(m_UseKeepAlive);
    7381    m_IntervalLowCtrl.EnableWindow(m_UseKeepAlive);
     82
     83    // Return TRUE unless you set the focus to a control.
     84    return TRUE;
    7485}
    7586
    76 BOOL COptionsConnection2::OnInitDialog()
     87void COptionsConnection2::OnCheckKeepAlive()
    7788{
    78     CSAPrefsSubDlg::OnInitDialog();
    79 
    80     m_IntervalHighCtrl.EnableWindow(m_UseKeepAlive);
     89    UpdateData(TRUE);
    8190    m_IntervalLowCtrl.EnableWindow(m_UseKeepAlive);
    82     return TRUE;  // return TRUE unless you set the focus to a control
    83                   // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
     91    m_IntervalHighCtrl.EnableWindow(m_UseKeepAlive);
    8492}
  • source/OptionsConnection2.h

    RCS file: /cvsroot/filezilla/FileZilla/source/OptionsConnection2.h,v
    retrieving revision 1.5
    diff -u -r1.5 OptionsConnection2.h
     
    3333// Dialogfelddaten
    3434    //{{AFX_DATA(COptionsConnection2)
    3535    enum { IDD = IDD_CONNECTION2 };
     36
     37    CEdit   m_AnonPwdCtrl;
     38    CString m_AnonPwd;
     39
     40    BOOL    m_UseKeepAlive;
     41
    3642    CEdit   m_IntervalLowCtrl;
     43    CString m_IntervalLow;
     44
    3745    CEdit   m_IntervalHighCtrl;
    38     UINT    m_Timeout;
    39     BOOL    m_UseKeepAlive;
    4046    CString m_IntervalHigh;
    41     CString m_IntervalLow;
     47
     48    UINT    m_Timeout;
     49
    4250    CString m_Delay;
    4351    CString m_NumRetries;
    4452    //}}AFX_DATA
     
    5664protected:
    5765    // Generierte Nachrichtenzuordnungsfunktionen
    5866    //{{AFX_MSG(COptionsConnection2)
    59     afx_msg void OnCheck1();
    6067    virtual BOOL OnInitDialog();
     68    afx_msg void OnCheckKeepAlive();
    6169    //}}AFX_MSG
    6270    DECLARE_MESSAGE_MAP()
    6371
  • source/SiteManager.cpp

    RCS file: /cvsroot/filezilla/FileZilla/source/SiteManager.cpp,v
    retrieving revision 1.64
    diff -u -r1.64 SiteManager.cpp
     
    10381038    if (!m_Logontype)
    10391039    {
    10401040        m_User="anonymous";
    1041         m_Pass="anon@";
     1041        m_Pass=COptions::GetOption(OPTION_ANONPWD);
    10421042    }
    10431043    else
    10441044    {
     
    19081908        else
    19091909        {
    19101910            m_User="anonymous";
    1911             m_Pass="anon@";
     1911            m_Pass=COptions::GetOption(OPTION_ANONPWD);
    19121912        }
    19131913        m_bFwBypass=site->bFirewallBypass;
    19141914        m_bPassDontSave=site->bPassDontSave;
  • source/resource.h

    RCS file: /cvsroot/filezilla/FileZilla/source/resource.h,v
    retrieving revision 1.117
    diff -u -r1.117 resource.h
     
    351351#define IDC_OPTIONS_CONNECTION2_ENABLEIPV6 1287
    352352#define IDC_COMBO1                      1288
    353353#define IDC_SITEMANAGER_ADVANCED_UTF8   1288
     354#define IDC_ANONPWD                     1289
    354355#define IDS_STATUSMSG_CONNECTED         2000
    355356#define IDS_STATUSMSG_CONNECTEDWITH     2001
    356357#define IDS_STATUSMSG_CONNECTEDWITHSFTP 2002
     
    758759#define _APS_3D_CONTROLS                     1
    759760#define _APS_NEXT_RESOURCE_VALUE        3106
    760761#define _APS_NEXT_COMMAND_VALUE         32902
    761 #define _APS_NEXT_CONTROL_VALUE         1289
     762#define _APS_NEXT_CONTROL_VALUE         1290
    762763#define _APS_NEXT_SYMED_VALUE           3205
    763764#endif
    764765#endif