![]() |
There is a security hole in this guys:
You can inject SQL as the $_POST variables here and further down in the script. Code:
$db->query_write("INSERT INTO " . TABLE_PREFIX . "brotator (id, name, alt, active) VALUES ('', '$fname', '$_POST[balt]', '$_POST[bact]')"); |
Quote:
then edit the plugin and make it show swf, i'm not used to swf, but i'm pretty sure it doesnt shows up with <img> code |
Quote:
try using http:// before to see if works fine |
Quote:
|
Quote:
|
andrefedalto, du'h silly me thnx man
|
Quote:
But its important that we as a community look out for and fix any security flaw we find, no matter how insignificant. My admins are fully trusted, I run hourly snapshots of my database, so I like you probably have nothing to worry about, however there are others out there who are less fortunate. Maybe they have opened it up to thier Moderators and on a busy site this could end up being a few people. The other worry is that someone will come along and reuse the code somewhere less secure not fully understanding the security issues. An Admin on my site caused an SQL error by placing an apostrophy in the description field i.e. Dave's picture. On examination it was a classic SQL injection hole. I did a quick fix to stop this happening, but I intend to rewrite it to use one of the core VB functions for coverting strings to SQL safe, that way when VB find any other injection type issues and fix them the fix will be reflected in this hack. Anyway if your interested here is my quick fix: Code:
$factv = addslashes(htmlspecialchars($_POST["bact"], ENT_QUOTES)); Code:
$db->query_write("INSERT INTO " . TABLE_PREFIX . "brotator (id, name, alt, active) VALUES ('', '$fname', '$fdesc', '$factv')"); I also added a little check before the query, for the odd occasion that theres an error in uploading the file: Code:
move_uploaded_file($ftemp, $dir.$fname); |
thanks turbo, i'll update the hack asap and i'll also add the check if file uploaded, just have to put the absolute path string, otherwise everyone would change it...
|
Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home/ftfhostc/fullthrottleforums.com/images/banners/Banner3.jpg) is not within the allowed path(s): (/dh/web/phpmyadmin:/tmp:/usr/local/tmp:/dh/solidclient:/usr/local/lib/php:/home/ftfhostc:/home/.beaver/ftfhostc) in /admincp/banner_rotator.php on line 56
Ok, I get the error also. I went and changed the two files and took the /forum off all the places it was in the original files. Why wont this work? If you go to http://www.fullthrottleforums.com/im...rs/Banner2.jpg it works, so how would I need to modify the two files for it to show the correct path? Thanks |
Try chmodding the banners directory to 0777
|
All times are GMT. The time now is 01:43 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|