vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   security seems not a main priority in vb hacks (https://vborg.vbsupport.ru/showthread.php?t=73307)

aussiev8 12-28-2004 11:47 AM

an installer isn't needed..
thats a totally different thread (put it in modification requests)

this thread is about security, i think we should stick to the topic.
would the advanced coders be willing to help do security tests on the mods as they're released? or maybe create a new group that'll beta test/security check new mods?

within a few years if this isn't contained now, the board will be one security issue after another, if jelsoft are reading this, i believe it is in your best interests to tackle this problem head on and without hesitiation!

my 2 cents

red_baron2000 12-28-2004 11:54 AM

all this won't happens if jelsoft take in considiration users needs and requests!! limiting the new release to the minimum is not not a solution either..for this we users need those hacks to fit our needs..even if they are full of bugs and security holes!! somehow we do not have choice either..way to go jelsoft!!!

Dean C 12-28-2004 12:03 PM

Well according to Scott in a recent post at vB.com it'll be impossible to input malicious user input in future vB versions, so fear not :)

aussiev8 12-29-2004 12:26 AM

thats never the case, what about basic get functions that can be made to act differently, i can always post different variables.

Erwin 12-29-2004 01:20 AM

Quote:

Originally Posted by AN-net
the globalize feature will not protect from sql injections i believe but will correctly evaluate a field such as text, numbers, or strs. i do not think it checks for sql injection. there 2 functions that can prevent sql injection:) these 2 are addslashes() for text or strs which adds slashes to single qutoes or regular quotes thus blocking most forms of sql injection. second is intval() which makes sure a field that is susposed to be a number is a number. if it is not it will return false and return 0 thus nullifying any possible text put in a number field;)

You can use globalize with this:

STR_NOHTML

Those 2 functions you posted are built-in as part of the intrinsic vB globalize function.

Erwin 12-29-2004 01:33 AM

Quote:

Originally Posted by Brad.loo
Your are right, globalize is a nice little function. Heres a little overview of everything it dose.

Use INT and globalize will run this on the $var

PHP Code:

intval($var); 

If you use STR

PHP Code:

trim($var); 

If you use STR_NOHTML

PHP Code:

htmlspecialchars_uni(trim($var)); 

You can also use FILE, which takes $_FILES['$var'] and makes it $array['$var']

Nice summary of the things globalize can do. :)

Add-on authors should utilize the built-in security vBulletin offers a lot more, rather than writing their own security checks.

Revan 12-29-2004 09:24 AM

Yeah I just went over every file in my new RPG version that didn't have globalize() already, and used it.

A side note about globalize():
If you want to run globalize() on an array, you have to skip using the "=>" stuff.
It would then be smart to run the functions quoted above on the variables as they are submitted into $DB_site->query() :)


Quote:

Originally Posted by Erwin
You can use globalize with this:

STR_NOHTML

Those 2 functions you posted are built-in as part of the intrinsic vB globalize function.

You sayin that by using the htmlspecialchars_uni(trim()) there's no need for addslashes()?

Paul M 12-29-2004 11:26 AM

Quote:

Originally Posted by Erwin
Add-on authors should utilize the built-in security vBulletin offers a lot more, rather than writing their own security checks.

Where are they all documented then ?

aussiev8 12-29-2004 11:59 PM

i'd like to know as well, i've done some searches but wound up empty

Wayne Luke 12-30-2004 12:22 AM

At this time the API isn't documented. It will be documented for the next release, however the usage of the inherent security features of vBulletin will change significantly so most hacks will need to be reworked anyway. We plan on providing full API documentation when the system is in a state to document.

As it is now, you need to go through the include folder and review the functions there to see what they do. Not optimal but that is what there is. Before the 3.0 release we concentrated on the Admin Control Panel Documentation because it would serve the most customers. When it came time to document the API enough significant changes were proposed and/or implemented that it was decided to postpone it.

aussiev8 12-30-2004 01:39 AM

when's the expected release date?
just a ball park figure?

Erwin 12-30-2004 01:52 AM

Quote:

Originally Posted by aussiev8
when's the expected release date?
just a ball park figure?

Jelsoft will not comment on an estimated date - they did this with vBulletin 3, and when it came out later than expected, users became upset at them even though back then it was just an estimate. So now, I doubt that Jelsoft will even release a ball park figure, and that is a wise move.

aussiev8 12-30-2004 09:41 AM

is it vbulletin v4?
or vbuletin 3.0.4?

Erwin 12-30-2004 08:17 PM

Last I heard it will be vBulletin 3.1 - but it may not. :)

Link14716 12-30-2004 10:15 PM

I just refer to it as vB 3.x.0.

Revan 12-30-2004 11:47 PM

Quote:

Originally Posted by Erwin
Last I heard it will be vBulletin 3.1 - but it may not. :)

I think that's most likely, when looking at how they numbered vB2.
But what I heard about it makes it sound like an almost complete rewrite, which would make a v4 more likely....
Ah sod it, we'll see. All this thinking makes my skull hurt! :p

Wayne Luke 12-31-2004 12:26 AM

Quote:

Originally Posted by Erwin
Last I heard it will be vBulletin 3.1 - but it may not. :)

Higher...

Erwin 12-31-2004 05:54 AM

Quote:

Originally Posted by Wayne Luke
Higher...

Ooh... ;)

Dean C 12-31-2004 11:02 AM

Quote:

Originally Posted by Wayne Luke
Higher...

:speechless:

Paul M 12-31-2004 11:44 AM

4.0 ?

Brad 01-01-2005 03:03 AM

3.2.0? ;)

cinq 03-24-2005 11:29 PM

Quote:

Originally Posted by Revan
You sayin that by using the htmlspecialchars_uni(trim()) there's no need for addslashes()?

This never got answered.
Anyone ?

Dean C 03-24-2005 11:59 PM

Really you should use mysql_escape_string when cleansing input for the database :) That's PHPs native function. I can't understand why everyone is using addslashes still (myself included ;))

Revan 03-25-2005 12:39 AM

What about mysql_real_escape_string()? ;)

cinq 03-25-2005 12:43 AM

So basically as long as you are using something as input into an SQL query, it would be good to use mysql_real_escape_string() first, regardless of whether it is a Insert, Select or whatever kind of query ?

Revan 03-25-2005 10:07 AM

This is what PHP Devs have to say:

Quote:

Originally Posted by PHP Manual
This function will escape special characters in the unescaped_string, taking into account the current character set of the connection so that it is safe to place it in a mysql_query(). If binary data is to be inserted, this function must be used.

mysql_real_escape_string() calls MySQL's library function mysql_escape_string, which prepends backslashes to the following characters: NULL, \x00, \n, \r, \, ', " and \x1a.


This function must always (with few exceptions) be used to make data safe before sending a query to MySQL.


Marco van Herwaarden 03-25-2005 10:21 AM

Quote:

Originally Posted by Dean C
Really you should use mysql_escape_string when cleansing input for the database :) That's PHPs native function. I can't understand why everyone is using addslashes still (myself included ;))

You are saying Addslashes is not a native PHP function?

AFAIK they are both native and almost identical (not mysql_real.. because that one also uses the database connection to take the character set used in account).

mysql_(real_)escape_string can be used since PHP 4.0.3, where addslashes was already available since PHP 3.

Revan 03-25-2005 10:39 AM

I want to know whether I should use mysql_real or keep using addslashes. Someone give me a definite "this or that" answer, or else someone will be in much pain ;)

Dean C 03-25-2005 11:33 AM

Sorry I was tired last night when I made that post. I meant mysql_real_escape_string, and that addslashes won't properly escape everything pasted to an SQL query like mysql_real_escape_string will :)

Adrian Schneider 03-25-2005 04:03 PM

Could someone write a tutorial on how to avoid such problems, maybe all the developers will follow it, I could sure use one.

sabret00the 03-25-2005 07:09 PM

here's a question

is it bad to do

PHP Code:

$variable addslahes($variable);
$DB_site->query("INSERT INTO table(column)
VALUES (
$variable)"); 


Tekton 03-25-2005 07:42 PM

I'm getting into the habit of uni'ing and adding the slashes to anything that isn't intvaled when inserted into the DB with user added stuff.

Marco van Herwaarden 03-25-2005 07:57 PM

Quote:

Originally Posted by sabret00the
here's a question

is it bad to do

PHP Code:

$variable addslahes($variable);
$DB_site->query("INSERT INTO table(column)
VALUES (
$variable)"); 


That is Ok

sabret00the 03-25-2005 08:16 PM

Quote:

Originally Posted by MarcoH64
That is Ok

thanks :)

MRGTB 10-22-2005 04:45 AM

On a lighter note, this thread made me laugh a little!

Because I see many people who have loads of hacks installed. Then when a new version of vBulletin is released they sometimes remove there whole board because of mass hacking which they cannot revert back to upgrade to a new version of vBulletin. Then after doing a clean install of the new vBulletin version to plug possible security issues, they then re-hack there board all over again which could possibly add security issues all over again which they just upgraded to avoid.

Hahaha, Guess there must be method in that madness somewhere! :squareeyed:

Onimua 10-22-2005 10:09 AM

Quote:

Originally Posted by Gary Bolton
On a lighter note, this thread made me laugh a little!

Because I see many people who have loads of hacks installed. Then when a new version of vBulletin is released they sometimes remove there whole board because of mass hacking which they cannot revert back to upgrade to a new version of vBulletin. Then after doing a clean install of the new vBulletin version to plug possible security issues, they then re-hack there board all over again which could possibly add security issues all over again which they just upgraded to avoid.

Hahaha, Guess there must be method in that madness somewhere! :squareeyed:

That is odd, heh.

I personally only modify files if it's something I feel is worth it (and if it's no more than at least 3 or so files). I also try to avoid plugins and hacks that modify the database as best as possible too.

Marco van Herwaarden 10-22-2005 10:58 AM

Modifying the database would not create a security problem in 99% of the cases. On the other hand 1 code edit (or even 1 plugin) could put your board wide open.

Onimua 10-22-2005 11:14 AM

Quote:

Originally Posted by MarcoH64
Modifying the database would not create a security problem in 99% of the cases. On the other hand 1 code edit (or even 1 plugin) could put your board wide open.

Avoidance of database changes are more of enabling me to easily upgrade more than anything else. I don't like wondering how anything database-wise would effect me later on. Just a thing of mine. :p

Zachariah 10-22-2005 12:30 PM

It's simple to me. RTFM
If it don't work uninstall it.

If you know how to fix it. PM / Email the creator how to fix.
Best of all, Backup so you can restore after you mess it up.

It's a NO BRAINER.

:D

Marco van Herwaarden 10-22-2005 01:52 PM

We where talking security i think?


All times are GMT. The time now is 10:26 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
  • Page Generation 0.01448 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete