Skip to content

Commit

Permalink
Fixed issue #07851: SQL injection in "user_name" form field (Thanks f…
Browse files Browse the repository at this point in the history
…romanmu)
  • Loading branch information
Shnoulle committed May 20, 2013
1 parent 218f6f8 commit c735bdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -95,7 +95,7 @@ function adduser()
if (empty($new_user)) {
$aViewUrls['message'] = array('title' => $clang->gT("Failed to add user"), 'message' => $clang->gT("A username was not supplied or the username is invalid."), 'class'=> 'warningheader');
}
elseif (User::model()->find("users_name='$new_user'")) {
elseif (User::model()->find("users_name=:users_name",array(':users_name'=>$new_user))) {
$aViewUrls['message'] = array('title' => $clang->gT("Failed to add user"), 'message' => $clang->gT("The username already exists."), 'class'=> 'warningheader');
}
elseif ($valid_email)
Expand Down

0 comments on commit c735bdb

Please sign in to comment.