baobabsoluciones / cornflow

An open source multi-solver optimization server with a REST API.
https://baobabsoluciones.github.io/cornflow/
Apache License 2.0
19 stars 3 forks source link

Fixed bug with endpoint accepting empty strings as passwords #512

Closed marioncottard closed 5 months ago

marioncottard commented 7 months ago

The PUT endpoint for users accepts empty strings in the "password" field and the the hashed password in the database is replaced by an empty string. I suspect the same goes for the email. This pr fixes the issue.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.01%. Comparing base (efcde90) to head (9d538f1). Report is 16 commits behind head on development.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #512 +/- ## =============================================== - Coverage 79.03% 79.01% -0.02% =============================================== Files 263 263 Lines 14857 14839 -18 =============================================== - Hits 11742 11725 -17 + Misses 3115 3114 -1 ``` | [Flag](https://app.codecov.io/gh/baobabsoluciones/cornflow/pull/512/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baobabsoluciones) | Coverage Δ | | |---|---|---| | [server-tests](https://app.codecov.io/gh/baobabsoluciones/cornflow/pull/512/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baobabsoluciones) | `83.12% <100.00%> (-0.04%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baobabsoluciones#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.