![]() |
Limitation of SQL Execution
Right now, I'm designing an interface on Classic to make a bridge way for the database and Staff. Although this makes a simplicity for others to use it, the vulnerabilities for requestsql() and requestsql2() exist.
If possible, I think it would be a wise idea to allow some sort of Server option to allow these commands to be executed only by certain allowed DB NPCs, Maybe classes, etc. The interface I'm designing though is compatible with anything that wants to request access to the databases, complete w/ permissions. But still, its security is still compromised due to the fact anyone with NC or Level access can cause unwanted hassles with our databases. |
Couldn't you use callstack protection? You can't restrict the commands themselves but you can restrict whatever system you're using to write and access the information and make it so only that system can make alterations.
|
Quote:
PHP Code:
Best course of action, don't let people you don't trust have access to the scripts and levels, and filter through them if you have to. Besides there are so many better things they could do maliciously. |
Quote:
|
HTML Code:
drop table [name] |
Quote:
Quote:
|
I would propose something like a server option to limit the calling of requestsql() to a list of weapons, similar to what was done for Client-RC. This would need to protect against external class joins too, I don't know how or if the Client-RC did that.
|
At the very least, it should be disabled in level scripts.
|
Quote:
This wouldn't be very secure unless you made some file name randomizer that always recreates the backup file with a different, random name so that no one can know its name unless they had direct rights to the file, which would help prevent people from messing with it that aren't supposed to. It would take some complex systems but I suppose it would be possible to mimic something like this. |
Quote:
buuuuuut, I'd still rather see built-in protection :p. |
Quote:
|
It would be good to have some kind of script rights system, may be for the start some way to set general rights that apply to all npcs, weapons and levels, and then a way to define rights for each single object. So it could be used to disallow putnpc2 by level npcs, and also disallow sql access.
|
Quote:
|
| All times are GMT +2. The time now is 07:07 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.