Skip to content

Commit

Permalink
[irods#7614] Improve handling of invalid message during agent initial…
Browse files Browse the repository at this point in the history
…ization.
  • Loading branch information
korydraughn authored and alanking committed Apr 1, 2024
1 parent 85fbc58 commit d72d1fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/core/src/rodsAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "irods/reconstants.hpp"
#include "irods/replica_access_table.hpp"
#include "irods/replica_state_table.hpp"
#include "irods/rodsErrorTable.h"
#include "irods/rsApiHandler.hpp"
#include "irods/server_utilities.hpp"
#include "irods/sockCommNetworkInterface.hpp"
Expand Down Expand Up @@ -141,8 +142,9 @@ int receiveDataFromServer(int conn_tmp_socket)
const auto pos = tmpStr.find('=');

if (pos == std::string_view::npos) {
// No equal sign was found.
continue;
log_agent_factory::error(
"{}: Malformed payload: please check the client's settings for invalid characters.", __func__);
return SYS_AGENT_INIT_ERR;
}

const auto lhs = tmpStr.substr(0, pos);
Expand Down

0 comments on commit d72d1fb

Please sign in to comment.