Lavalair patchwork

Started on the old forum in March 2013 · view the original in the archive · old links redirect here

#lava #security

23 replies · 4,147 views · started 13 years ago · 1 min read

TL;DR · summary of 23 replies
  • Removing all globals which are used more than three times should be done in core.php.
  • Adding mysql_real_escape_string() to user inputs to prevent SQL injection.
  • Updating session handling from URL parameters to $_SESSION for better security and preventing session hijacking.
  • Checking if users are allowed to create sessions on login page, not every page.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

14 participants
something else Fellow · 2,296 posts #21

stefan998 wrote: Does anyone knows how to protect admin from banning

Take away there admin rights? - banning is the least of your worries that an admin can do in wapdesire script - A Simple html form modification and your admin can make them selfs owners lol

thunderwap Developer · 169 posts #22

stefan998 wrote: Does anyone knows how to protect admin from banning

use this code in admnproc inside $action==ipban

$uid = getuid_sid($sid);
  $perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
  $trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));

  if($trgtperm>$perm){
  echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
  echo "<br/>U Cannot Ip-ban $user<br/>";
  echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
  echo "</p>";
  }else

{

your other codes goes here

}

WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

wapxtech Developer · 189 posts #23

thunderwap wrote: use this code in admnproc inside $action==ipban

$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));

if($trgtperm>$perm){
echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
}else

{

your other codes goes here

}

let me fix your code

$uid = getuid_sid($sid);
$perm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE id='".$uid."'"));
$trgtperm = mysql_fetch_array(mysql_query("SELECT perm FROM ibwf_users WHERE name='".$user."'"));

if($trgtperm[0]>$perm[0]){
echo "<b><img src="../images/notok.gif" alt="x"/><br/>Error!!!<br/>Permission Denied...</b><br/>";
echo "<br/>U Cannot Ip-ban $user<br/>";
echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt=""/>Home</a>";
echo "</p>";
}else

{

your other codes goes here

}

remember that you are calling an array not a string 🙂

External image (may be gone) http://wapx.amob.com Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close