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

[SQL] Value out of range #421

Open
IGLOU-EU opened this issue Nov 30, 2020 · 4 comments
Open

[SQL] Value out of range #421

IGLOU-EU opened this issue Nov 30, 2020 · 4 comments

Comments

@IGLOU-EU
Copy link
Contributor

Hi,
a critical error break the script on :

  • ifaces/edition_types_contenants.php
  • moteur/type_poubelles_post.php

Error out put:

POST /moteur/type_contenants_post.php - Uncaught PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'masse' at row 1 in /tmp/oressource/moteur/type_contenants_post.php:29
Stack trace:
#0 /tmp/oressource/moteur/type_contenants_post.php(29): PDOStatement->execute(Array)
#1 {main}
  thrown in /tmp/oressource/moteur/type_contenants_post.php on line 29

Reproduce :

  • Go to contenants or poubelles type
  • Enter a very huge mass
  • Save ... Crash !
@darnuria
Copy link
Contributor

darnuria commented Dec 7, 2020

hmm côté applicatif faudrait check que la valeur entrée est bien un entier et qu'il est supérieur a 0 et compris jusque a MaxInt ça eviterais a mysql de devenir fou.

darnuria added a commit that referenced this issue Dec 7, 2020
@darnuria
Copy link
Contributor

darnuria commented Dec 7, 2020

0ceb018 devrait apporter une mitigation relative

darnuria added a commit that referenced this issue Dec 7, 2020
@darnuria
Copy link
Contributor

darnuria commented Dec 7, 2020

a test: #426

@darnuria
Copy link
Contributor

darnuria commented Dec 7, 2020

Ça peut toujours crash mais au moins c'est prévisible.

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

2 participants