mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-12 18:36:29 +00:00
Empty commit
This commit is contained in:
parent
a4c3ae1184
commit
9f072764d3
@ -1,5 +1,8 @@
|
||||
CHANGE LOG
|
||||
|
||||
2016-01-03 by newman
|
||||
Fix several permissions bugs
|
||||
|
||||
2015-12-24 by newman
|
||||
Fix several XSS, SQLi, and misc vulnerabilities
|
||||
|
||||
|
@ -1,12 +1,20 @@
|
||||
<?
|
||||
//TODO: Redo HTML
|
||||
if (!check_perms('admin_manage_permissions')) {
|
||||
error(403);
|
||||
}
|
||||
if (!isset($_REQUEST['userid']) || !is_number($_REQUEST['userid'])) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
// Get the user class of the user being edited to ensure that the logged in user has permission
|
||||
$DB->query("SELECT p.Level
|
||||
FROM permissions p
|
||||
JOIN users_main AS um ON um.PermissionID = p.ID
|
||||
WHERE um.ID = '" . $_REQUEST['userid'] . "'");
|
||||
list($UserClass) = $DB->next_record();
|
||||
|
||||
if (!check_perms('admin_manage_permissions', $UserClass)) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
include(SERVER_ROOT."/classes/permissions_form.php");
|
||||
|
||||
list($UserID, $Username, $PermissionID) = array_values(Users::user_info($_REQUEST['userid']));
|
||||
|
@ -50,9 +50,9 @@
|
||||
<? if ($Edit <= $LoggedUser['EffectiveClass']) { ?>
|
||||
<a href="wiki.php?action=edit&id=<?=$ArticleID?>" class="brackets">Contribute</a>
|
||||
<a href="wiki.php?action=revisions&id=<?=$ArticleID?>" class="brackets">History</a>
|
||||
<? } ?>
|
||||
<? if (check_perms('admin_manage_wiki') && $_GET['id'] != INDEX_ARTICLE) { ?>
|
||||
<a href="wiki.php?action=delete&id=<?=$ArticleID?>&authkey=<?=$LoggedUser['AuthKey']?>" class="brackets" onclick="return confirm('Are you sure you want to delete?\nYes, DELETE, not as in \'Oh hey, if this is wrong we can get someone to magically undelete it for us later\' it will be GONE.\nGiven this new information, do you still want to DELETE this article and all its revisions and all its alias\' and act like it never existed?')">Delete</a>
|
||||
<? if (check_perms('admin_manage_wiki') && $_GET['id'] != INDEX_ARTICLE) { ?>
|
||||
<a href="wiki.php?action=delete&id=<?=$ArticleID?>&auth=<?=$LoggedUser['AuthKey']?>" class="brackets" onclick="return confirm('Are you sure you want to delete?\nYes, DELETE, not as in \'Oh hey, if this is wrong we can get someone to magically undelete it for us later\' it will be GONE.\nGiven this new information, do you still want to DELETE this article and all its revisions and all its alias\' and act like it never existed?')">Delete</a>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<!--<a href="reports.php?action=submit&type=wiki&article=<?=$ArticleID ?>" class="brackets">Report</a>-->
|
||||
</div>
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?
|
||||
authorize();
|
||||
|
||||
if (!check_perms('admin_manage_wiki')) {
|
||||
error(403);
|
||||
}
|
||||
@ -12,6 +14,13 @@
|
||||
error('You cannot delete the main wiki article.');
|
||||
}
|
||||
|
||||
$DB->query("SELECT MinClassEdit FROM wiki_articles WHERE ID = '$ID'");
|
||||
list($MinEditClass) = $DB->next_record();
|
||||
|
||||
if ($MinEditClass > $LoggedUser['EffectiveClass']) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$DB->query("
|
||||
SELECT Title
|
||||
FROM wiki_articles
|
||||
|
Loading…
Reference in New Issue
Block a user