Hi, I don't want to use apache auth to login piwigo, but the contrary.
I want to use piwigo identifiers (in piwigo_users) to identify my users in another app, by apache mysql auth.
My apache config is good, tested with another table (MD5, BCRYT or SHA), but I always get an error with piwigo idents : AH01617: user Chris: authentication failure for "/video": Password Mismatch
I spent a moment on it, and found that modifying "$portable_hashes" to false did the trick.
--- functions_user.inc.php.orig 2021-05-03 17:59:18.044738074 +0200
+++ functions_user.inc.php 2021-05-13 22:08:51.727449387 +0200
@@ -1000,7 +1000,7 @@
// We use the portable hash feature from phpass because we can't be sure
// Piwigo runs on PHP 5.3+ (and won't run on an older version in the
// future)
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, false);
}
return $pwg_hasher->HashPassword($password);
But, it would be better to use a configuration option than modify the code, of course.
Is there a way to do it ? Or is it possible to include an option in the future ?
Hi, I don't want to use apache auth to login piwigo, but the contrary.
I want to use piwigo identifiers (in piwigo_users) to identify my users in another app, by apache mysql auth.
My apache config is good, tested with another table (MD5, BCRYT or SHA), but I always get an error with piwigo idents :
`AH01617: user Chris: authentication failure for "/video": Password Mismatch`
I spent a moment on it, and found that modifying "$portable_hashes" to false did the trick.
```
--- functions_user.inc.php.orig 2021-05-03 17:59:18.044738074 +0200
+++ functions_user.inc.php 2021-05-13 22:08:51.727449387 +0200
@@ -1000,7 +1000,7 @@
// We use the portable hash feature from phpass because we can't be sure
// Piwigo runs on PHP 5.3+ (and won't run on an older version in the
// future)
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, false);
}
return $pwg_hasher->HashPassword($password);
```
But, it would be better to use a configuration option than modify the code, of course.
Is there a way to do it ? Or is it possible to include an option in the future ?
<!-- github-sync-id:891348074 -->
--- functions_user.inc.php.orig 2021-05-03 17:59:18.044738074 +0200
+++ functions_user.inc.php 2021-05-14 16:04:02.315436550 +0200
@@ -1000,7 +1000,7 @@
// We use the portable hash feature from phpass because we can't be sure
// Piwigo runs on PHP 5.3+ (and won't run on an older version in the
// future)
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, $conf['portable_hashes']);
}
return $pwg_hasher->HashPassword($password);
@@ -1058,7 +1058,7 @@
require_once(PHPWG_ROOT_PATH.'include/passwordhash.class.php');
// We use the portable hash feature
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, $conf['portable_hashes']);
}
return $pwg_hasher->CheckPassword($password, $hash);
with a configuration option: $conf['portable_hashes'] = true; (by default, false for my case)
would be perfect.
Modifying the code like :
```
--- functions_user.inc.php.orig 2021-05-03 17:59:18.044738074 +0200
+++ functions_user.inc.php 2021-05-14 16:04:02.315436550 +0200
@@ -1000,7 +1000,7 @@
// We use the portable hash feature from phpass because we can't be sure
// Piwigo runs on PHP 5.3+ (and won't run on an older version in the
// future)
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, $conf['portable_hashes']);
}
return $pwg_hasher->HashPassword($password);
@@ -1058,7 +1058,7 @@
require_once(PHPWG_ROOT_PATH.'include/passwordhash.class.php');
// We use the portable hash feature
- $pwg_hasher = new PasswordHash(13, true);
+ $pwg_hasher = new PasswordHash(13, $conf['portable_hashes']);
}
return $pwg_hasher->CheckPassword($password, $hash);
```
with a configuration option:
`$conf['portable_hashes'] = true;` (by default, false for my case)
would be perfect.
<!-- github-comment-id:841269773 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi, I don't want to use apache auth to login piwigo, but the contrary.
I want to use piwigo identifiers (in piwigo_users) to identify my users in another app, by apache mysql auth.
My apache config is good, tested with another table (MD5, BCRYT or SHA), but I always get an error with piwigo idents :
AH01617: user Chris: authentication failure for "/video": Password MismatchI spent a moment on it, and found that modifying "$portable_hashes" to false did the trick.
But, it would be better to use a configuration option than modify the code, of course.
Is there a way to do it ? Or is it possible to include an option in the future ?
Modifying the code like :
with a configuration option:
$conf['portable_hashes'] = true;(by default, false for my case)would be perfect.