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

Issue in Reset Password with database postgre #324

Closed
caosdp-rs opened this issue Mar 2, 2021 · 1 comment
Closed

Issue in Reset Password with database postgre #324

caosdp-rs opened this issue Mar 2, 2021 · 1 comment
Labels

Comments

@caosdp-rs
Copy link

UPDATE "users" SET "password_hash" = '$2y$10$30Whf9ceEJfPA2l6SRlM3OWRadjcNuaUIdMAgz4TdcKEooPF2ds26', "reset_hash" = NULL, "reset_at" = '2021-03-01 21:55:11', "reset_expires" = NULL, "force_pass_reset" = '', "updated_at" = '2021-03-01 21:55:11' WHERE "users"."id" IN ('1')

issue in "force_pass_reset" = '' not accept ''
in AuthController.php
$user->force_pass_reset = false;

not convert to 0, but is ''

PHP: 7.4.3 — CodeIgniter: 4.1.1

@MGatner MGatner added the bug label Jul 2, 2021
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 19, 2022
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 19, 2022
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 22, 2022
…ict DB

This patch doesn't modify the database schema and, instead, forcibly converts
booleans to integers.

Another way of fixing lonnieezell#324 would be to use booleans at the database level : the
code change is bigger but, since MySQL & MariaDB would implictly convert to
tinyint and SQLite isn't typed, the impact on existing deployments may still be
acceptable.
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 22, 2022
This patch allows Myth:Auth to support all three of SQLite, MariaDB and
PostgreSQL.

- change 'tinyint' to 'boolean' on the migration,
- switch 0/1 to true/false coherently throughout the code.

Fix lonnieezell#324
@xlii-chl
Copy link
Contributor

xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 25, 2022
As PostgreSQL is strongly typed and doesn't have an implicit cast between
booleans and integers, we strictly use integers for the force_pass_reset
field.
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 25, 2022
As PostgreSQL is strongly typed and doesn't have an implicit cast between
booleans and integers, we strictly use integers for the force_pass_reset
field.
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Feb 26, 2022
As PostgreSQL is strongly typed and doesn't have an implicit cast between
booleans and integers, we strictly use integers for the force_pass_reset
field.
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Apr 29, 2022
…ict DB

This patch doesn't modify the database schema and, instead, forcibly converts
booleans to integers.

Another way of fixing lonnieezell#324 would be to use booleans at the database level : the
code change is bigger but, since MySQL & MariaDB would implictly convert to
tinyint and SQLite isn't typed, the impact on existing deployments may still be
acceptable.
xlii-chl added a commit to xlii-chl/myth-auth that referenced this issue Apr 29, 2022
…ict DB

This patch doesn't modify the database schema and, instead, forcibly converts
booleans to integers.

Another way of fixing lonnieezell#324 would be to use booleans at the database level : the
code change is bigger but, since MySQL & MariaDB would implictly convert to
tinyint and SQLite isn't typed, the impact on existing deployments may still be
acceptable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants