hide anonymous's user page - having made a million comments, it was taking upwards of 60 seconds to process that one page, triggering the DOS defences...
This commit is contained in:
parent
a55eca4462
commit
0b13db8ed7
@ -144,12 +144,17 @@ class CommentListTheme extends Themelet {
|
|||||||
$i_comment_id = int_escape($comment->comment_id);
|
$i_comment_id = int_escape($comment->comment_id);
|
||||||
$i_image_id = int_escape($comment->image_id);
|
$i_image_id = int_escape($comment->image_id);
|
||||||
|
|
||||||
|
if($h_name == "Anonymous") {
|
||||||
$anoncode = "";
|
$anoncode = "";
|
||||||
if($h_name == "Anonymous" && $this->anon_id >= 0) {
|
if($this->anon_id >= 0) {
|
||||||
$anoncode = '<sup>'.$this->anon_id.'</sup>';
|
$anoncode = '<sup>'.$this->anon_id.'</sup>';
|
||||||
$this->anon_id++;
|
$this->anon_id++;
|
||||||
}
|
}
|
||||||
$h_userlink = '<a href="'.make_link('user/'.$h_name).'">'.$h_name.'</a>'.$anoncode;
|
$h_userlink = $h_name . $anoncode;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$h_userlink = '<a href="'.make_link('user/'.$h_name).'">'.$h_name.'</a>';
|
||||||
|
}
|
||||||
$stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50));
|
$stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50));
|
||||||
$stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
|
$stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
|
||||||
$h_dellink = $user->is_admin() ?
|
$h_dellink = $user->is_admin() ?
|
||||||
|
@ -158,7 +158,7 @@ class UserPage extends SimpleExtension {
|
|||||||
$this->theme->display_error($page, "Not Logged In",
|
$this->theme->display_error($page, "Not Logged In",
|
||||||
"You aren't logged in. First do that, then you can see your stats.");
|
"You aren't logged in. First do that, then you can see your stats.");
|
||||||
}
|
}
|
||||||
else if(!is_null($display_user)) {
|
else if(!is_null($display_user) && ($display_user->id != $config->get_int("anon_id"))) {
|
||||||
send_event(new UserPageBuildingEvent($display_user));
|
send_event(new UserPageBuildingEvent($display_user));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user