BINKP auth fix for bind, better detection of SKIP files

This commit is contained in:
mysticbbs 2013-09-10 22:55:14 -04:00
parent 5ceb74a3f4
commit 251e2cef37
3 changed files with 31 additions and 5 deletions

View File

@ -297,7 +297,7 @@ Begin
If RxBufSize > 255 Then
SZ := 255
Else
SZ := RxBufSize - 1;
SZ := RxBufSize;
Move (RxBuffer[1], Result[1], SZ);
@ -313,6 +313,8 @@ Begin
Client.BufWriteStr(Char(Hi(DataSize)) + Char(Lo(DataSize)) + Char(CmdType) + CmdData + #0);
Client.BufFlush;
StatusUpdate (Owner, 'S ' + BinkCmdStr[CmdType] + ' ' + CmdData);
// WriteLn (' S ' + BinkCmdStr[CmdType] + ' ' + CmdData);
// waitms(1000);
//WriteLn ('Put Command Frame (', BinkCmdStr[CmdType], ') Data: ', CmdData);
@ -370,6 +372,10 @@ Begin
HaveHeader := True;
End;
If RxFrameType = Command Then
StatusUpdate (Owner, 'R ' + BinkCmdStr[RxCommand] + ' ' + GetDataStr);
// Case RxFrameType of
// Command : If (RxCommand = M_NUL) or (RxCommand = M_ERR) Then
// WriteLn (' R ', BinkCmdStr[RxCommand], ' ', GetDataStr);
@ -517,7 +523,7 @@ Begin
End;
If AuthState <> AuthOK Then
StatusUpdate(Owner, 'Auth failed');
StatusUpdate(Owner, 'Authorization failed');
End;
WaitPwdOK : If HaveHeader Then Begin
If RxCommand <> M_OK Then
@ -637,6 +643,15 @@ Begin
Case TxState of
TxGetEOF : Begin
If HaveHeader Then
If RxCommand = M_SKIP Then Begin
{$I-} Close (OutFile); {$I+}
If IoResult <> 0 Then;
HaveHeader := False;
NeedHeader := True;
TxState := TxNextFile;
End Else
If RxCommand = M_GOT Then Begin
FileList.QData[FileList.QPos].Status := QueueSuccess;
@ -666,6 +681,13 @@ Begin
TxState := TxDone;
End;
TxSendData : Begin
If HaveHeader And (RxCommand = M_SKIP) Then Begin
Close (OutFile);
TxState := TxNextFile;
HaveHeader := False;
NeedHeader := True;
End Else
If HaveHeader And (RxCommand = M_GET) Then Begin
Str := strWordGet(4, GetDataStr, ' ');

View File

@ -535,7 +535,9 @@ Begin
Server.Status (ProcessID, 'Exported ' + strI2S(QWK.TotalMessages) + ' msgs@' + bbsCfg.QwkBBSID + '.qwk');
ExecuteArchive (TempPath, TempPath + bbsCfg.QwkBBSID + '.qwk', User.Archive, TempPath + '*', 1);
If SendFile (TempPath + bbsCfg.QwkBBSID + '.qwk') Then
Result := SendFile (TempPath + bbsCfg.QwkBBSID + '.qwk');
If Result Then
QWK.UpdateLastReadPointers;
QWK.Free;
@ -630,8 +632,8 @@ Begin
End;
Procedure TFTPServer.cmdPASV;
Var
WaitSock : TIOSocket;
//Var
// WaitSock : TIOSocket;
Begin
If LoggedIn Then Begin
If Not bbsConfig.inetFTPPassive Then Begin

View File

@ -42,6 +42,8 @@ BUGS AND POSSIBLE ISSUES
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
=========================================
- ability when editing a posted message to be able to toggle the Private flag
if the base is Pub/Priv
- toutput on unix should detect XTERM settings for window size and restore
them on exit.
- NODELIST copy function (process nodelist directory and copy+copy to data)