Merge lp:~seif/zeitgeist/use-new-placeholders into lp:zeitgeist/0.1
Proposed by
Seif Lotfy
Status: | Rejected |
---|---|
Rejected by: | Seif Lotfy |
Proposed branch: | lp:~seif/zeitgeist/use-new-placeholders |
Merge into: | lp:zeitgeist/0.1 |
Diff against target: |
30 lines (+3/-3) 1 file modified
_zeitgeist/engine/main.py (+3/-3) |
To merge this branch: | bzr merge lp:~seif/zeitgeist/use-new-placeholders |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zeitgeist Framework Team | Pending | ||
Review via email: mp+42943@code.launchpad.net |
Description of the change
The SQLite docs say:
---
You shouldn’t assemble your query using Python’s string operations because doing so is insecure; it makes your program vulnerable to an SQL injection attack.
Instead, use the DB-API’s parameter substitution. Put ? as a placeholder wherever you want to use a value, and then provide a tuple of values as the second argument to the cursor’s execute() method.
---
This branch fixes it.
To post a comment you must log in.
Unmerged revisions
- 1645. By Seif Lotfy
-
Use ? placeholders instead of using Python's string operations. What we were doing is insecure
I believe we use the current approach because the 'correct' one fails with /code.launchpad .net/~seif/ zeitgeist/ use-new- placeholders/ +merge/ 42943
thousands of ids in the arguments
On Dec 7, 2010 3:01 PM, "Seif Lotfy" <email address hidden> wrote:
> Seif Lotfy has proposed merging lp:~seif/zeitgeist/use-new-placeholders
into lp:zeitgeist.
>
> Requested reviews:
> Zeitgeist Framework Team (zeitgeist)
>
>
> The SQLite docs say:
> ---
> You shouldn’t assemble your query using Python’s string operations because
doing so is insecure; it makes your program vulnerable to an SQL injection
attack.
>
> Instead, use the DB-API’s parameter substitution. Put ? as a placeholder
wherever you want to use a value, and then provide a tuple of values as the
second argument to the cursor’s execute() method.
> ---
> This branch fixes it.
> --
>
https:/
> Your team Zeitgeist Framework Team is requested to review the proposed
merge of lp:~seif/zeitgeist/use-new-placeholders into lp:zeitgeist.