Avoid ISecureRandom::CHAR_HUMAN_READABLE to retain compatibility with
ownCloud and Nextcloud < 12.0.0
This commit is contained in:
parent
561e4bd6ae
commit
01fa314fc5
|
|
@ -93,7 +93,8 @@ class RegistrationMapper extends Mapper {
|
|||
* @param Registration $registration
|
||||
*/
|
||||
public function generateClientSecret(Registration &$registration) {
|
||||
$token = $this->random->generate(32, ISecureRandom::CHAR_HUMAN_READABLE);
|
||||
$token = $this->random->generate(32, "abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789");
|
||||
//FIXME eqivalent to ISecureRandom::CHAR_HUMAN_READABLE introduced in https://github.com/nextcloud/server/commit/f2a2b34e4639e88f8d948a388a51f010212b42a3 but not supported in ownCloud yet. We'll just use the string for now then switch to constants when supported.
|
||||
$registration->setClientSecret($token);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue