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

Bypassing a filter #8

Open
hicach99 opened this issue Dec 22, 2023 · 0 comments
Open

Bypassing a filter #8

hicach99 opened this issue Dec 22, 2023 · 0 comments

Comments

@hicach99
Copy link

hicach99 commented Dec 22, 2023

I'm having a problem bypassing filter.

function filter($input) {
    if(get_magic_quotes_gpc())
        $input= stripslashes($input);
    $input = mysql_real_escape_string($input);
    return $input;
}

so the filter uses stripslashes & mysql_real_escape_string which makes it hard to inject

$id = $_GET['id'];
$id = filter($id);
$query = "select * from users where `id` = '$id' and 1=0 ;"; // for example
$result = mysql_query($query , $connection);

Is there a way to bypass it. Thanks in advance. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant