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

Incorrect postal code not handled correctly #39

@JohanBraeken

Description

@JohanBraeken

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions