|
|
|
@ -499,19 +499,19 @@ void Functions::MakeFunction()
|
|
|
|
|
|
|
|
|
|
void Functions::CheckGetPostTimes(time_t difference) |
|
|
|
|
{ |
|
|
|
|
time_t now = std::time(0); |
|
|
|
|
|
|
|
|
|
if( cur->session->puser ) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
if( cur->request->method != Request::post ) |
|
|
|
|
return; |
|
|
|
|
if( !cur->session->puser && config->use_antispam_mechanism_for_not_logged_users ) |
|
|
|
|
{ |
|
|
|
|
time_t now = std::time(0); |
|
|
|
|
|
|
|
|
|
if( now - cur->session->last_time_get >= (time_t)difference ) |
|
|
|
|
return; |
|
|
|
|
if( cur->request->method != Request::post ) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
cur->session->spam_score += 1; |
|
|
|
|
log << log1 << "Functions: spam +1: POST after GET sent too fast" << logend; |
|
|
|
|
if( now - cur->session->last_time_get >= (time_t)difference ) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
cur->session->spam_score += 1; |
|
|
|
|
log << log1 << "Functions: spam +1: POST after GET sent too fast" << logend; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -519,7 +519,7 @@ void Functions::CheckGetPostTimes(time_t difference)
|
|
|
|
|
|
|
|
|
|
bool Functions::CheckAntispamCounter() |
|
|
|
|
{ |
|
|
|
|
if( !cur->session->puser ) |
|
|
|
|
if( !cur->session->puser && config->use_antispam_mechanism_for_not_logged_users ) |
|
|
|
|
{ |
|
|
|
|
long form_id = Tol(cur->request->PostVar(L"winix_form_id")); |
|
|
|
|
long counter_id = Tol(cur->request->PostVar(L"winix_form_counter")); |
|
|
|
|