Новая Школа - онлайн-школа подготовки к ЕГЭ
Задача Задача №3622596
А
Аноним
18 июня 2026 09:57 · публичный вопрос
А
Аноним

-1' OR 3*2>5 --

Ответ нейросети
18 июня 2026 09:57

This is a classic SQL injection payload.

  • -1' ends a string literal in the SQL query (it closes the quote).
  • OR introduces another condition.
  • 3*2>5 computes to 6>5, which is true.
  • -- comments out the rest of the statement.

In a vulnerable query like: SELECT * FROM users WHERE username = '\(input' AND password = '\)password'; If input is -1' OR 32>5 --, the WHERE clause becomes something like: username = '-1' OR 32>5 --

Since 3*2>5 is true, the condition evaluates to true, and the rest of the query is commented out. This can allow bypassing authentication.

Defensive measures:

  • Use prepared statements/parameterized queries.
  • Validate and sanitize inputs.
  • Use least-privilege database accounts.
  • Consider input whitelisting and proper error handling.