appsup-dart / openid_client

Library for working with OpenID Connect and implementing clients.
BSD 3-Clause "New" or "Revised" License
90 stars 118 forks source link

_randomString is not using it's length parameter #72

Closed wferem1 closed 1 year ago

wferem1 commented 2 years ago

in lib/src/openid.dart the method _randomString is not using the length parameter, but will always return with a String of length 50.

String _randomString(int length) {
  var r = Random.secure();
  var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  return Iterable.generate(50, (_) => chars[r.nextInt(chars.length)]).join();
}
rbellens commented 1 year ago

Hi @wferem1 , This is fixed in commit 850acc961347436c4f5a2fc6828b5a926b51423d. I will release a new version containing this fix soon.