Put limit to string extraction

This commit is contained in:
phl0
2026-01-04 08:29:21 +01:00
parent 3cac324d99
commit f3dc790f92

View File

@@ -766,7 +766,7 @@ class Lotw extends CI_Controller {
break;
}
continue;
} else if(str_contains($content,"Username/password incorrect</I>")) {
} else if(str_contains(substr($content,0 , 2000),"Username/password incorrect</I>")) {
$result = "LoTW download failed for user ".$user->user_lotw_name.": Username/password incorrect";
log_message('error', 'LoTW download failed for user '.$user->user_name.': Username/password incorrect');
if ($this->Lotw_model->remove_lotw_credentials($user->user_id)) {
@@ -775,7 +775,7 @@ class Lotw extends CI_Controller {
log_message('error', 'Deleting LoTW credentials for user '.$user->user_name.' failed');
}
continue;
} else if (str_contains($content,"Page Request Limit!</B>")) {
} else if (str_contains(substr($content, 0, 2000),"Page Request Limit!</B>")) {
$result = "LoTW download hit a rate limit for user ".$user->user_lotw_name;
log_message('error', 'LoTW download hit a rate limit for user '.$user->user_name);
continue;