mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-12-23 03:11:49 +01:00
parent
c7bbb93fd5
commit
bc3c096b39
@ -1478,8 +1478,9 @@ void FtpSession::readCommand (int const events_)
|
|||||||
else if (m_state != State::COMMAND)
|
else if (m_state != State::COMMAND)
|
||||||
{
|
{
|
||||||
// only some commands are available during data transfer
|
// only some commands are available during data transfer
|
||||||
if (::strcasecmp (command, "ABOR") != 0 && ::strcasecmp (command, "STAT") != 0 &&
|
if (::strcasecmp (command, "ABOR") != 0 && ::strcasecmp (command, "NOOP") != 0 &&
|
||||||
::strcasecmp (command, "QUIT") != 0)
|
::strcasecmp (command, "PWD") != 0 && ::strcasecmp (command, "QUIT") != 0 &&
|
||||||
|
::strcasecmp (command, "STAT") != 0 && ::strcasecmp (command, "XPWD") != 0)
|
||||||
{
|
{
|
||||||
sendResponse ("503 Invalid command during transfer\r\n");
|
sendResponse ("503 Invalid command during transfer\r\n");
|
||||||
setState (State::COMMAND, true, true);
|
setState (State::COMMAND, true, true);
|
||||||
@ -2339,6 +2340,9 @@ void FtpSession::PORT (char const *args_)
|
|||||||
|
|
||||||
void FtpSession::PWD (char const *args_)
|
void FtpSession::PWD (char const *args_)
|
||||||
{
|
{
|
||||||
|
// handle keep-alive
|
||||||
|
if (m_state == State::COMMAND)
|
||||||
|
{
|
||||||
setState (State::COMMAND, false, false);
|
setState (State::COMMAND, false, false);
|
||||||
|
|
||||||
if (!authorized ())
|
if (!authorized ())
|
||||||
@ -2346,6 +2350,7 @@ void FtpSession::PWD (char const *args_)
|
|||||||
sendResponse ("530 Not logged in\r\n");
|
sendResponse ("530 Not logged in\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto const path = encodePath (m_cwd);
|
auto const path = encodePath (m_cwd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user