Skip to content

Commit

Permalink
Fix detection of loop request (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Dec 19, 2020
1 parent a677384 commit a57906c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webserver_libevent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void OnReq(evhttp_request *req, void *args)
//std::cerr<<"Accept connection from client "<<client_ip<<":"<<client_port<<"\n";
writeLog(0, "Accept connection from client " + std::string(client_ip) + ":" + std::to_string(client_port), LOG_LEVEL_DEBUG);

if(internal_flag != NULL && strcmp(internal_flag, "1") == 0)
if(internal_flag != NULL) //check for flag existence
{
evhttp_send_error(req, 500, "Loop request detected!");
return;
Expand Down

0 comments on commit a57906c

Please sign in to comment.