Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Incorrect postal code not handled correctly #39

Open
JohanBraeken opened this issue Aug 25, 2014 · 0 comments
Open

Incorrect postal code not handled correctly #39

JohanBraeken opened this issue Aug 25, 2014 · 0 comments
Labels

Comments

@JohanBraeken
Copy link

When signing up with a postcode that is not an integer, the registration "completes", but also a "500 Internal server error" is thrown.
The user doesn't receive any indication of what went wrong.

On the server side, the following is logged:

/site-packages/sqlalchemy/engine/default.py:436: Warning: Incorrect integer value: 'B-1234' for column 'postalcode' at row 1
cursor.execute(statement, parameters)
[25/Aug/2014 16:00:31] "POST /register HTTP/1.1" 500 -

In the database, the postal code for that user has become '0', effectively corrupting the user input.

If the registration fails for any reason, no data should be changed/added in the database.
Postal codes are also not integers, especially not in other countries than Belgium.

@warddr warddr added the bug label Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants