Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor devextra.c to use prepared statements #33

Open
sean-gilliam opened this issue Oct 18, 2019 · 0 comments
Open

Refactor devextra.c to use prepared statements #33

sean-gilliam opened this issue Oct 18, 2019 · 0 comments
Labels
security security flaw related bug

Comments

@sean-gilliam
Copy link
Collaborator

Right now devextra.c uses several hard coded SQL queries that are vulnerable to SQL injection.

We need to convert those queries to use prepared statements.

Example: (https://github.com/rezalas/riftshadow/blob/master/code/devextra.c#L171-L172)

void do_listoffer(CHAR_DATA *ch, char *argument)
{
...
	sprintf(query,"SELECT * FROM offerings WHERE deity = \"%s\" %s ORDER BY time ASC",
		ch->true_name, autol ? "AND status = 0" : "");
... more logic ...
}
@sean-gilliam sean-gilliam added the security security flaw related bug label Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security security flaw related bug
Projects
None yet
Development

No branches or pull requests

1 participant