jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.67k stars 95 forks source link

Fix black QR code in TOTP feature #279

Closed janko closed 1 year ago

janko commented 1 year ago

The # is already prepended to the passed fill color, so we need to pass it without a #, otherwise we get a ##fff fill, which results in a completely black square.

Fixes https://github.com/janko/rodauth-rails/issues/169

jeremyevans commented 1 year ago

Thanks for the patch! Sorry for the breakage. I'll try to release 2.26.1 with this fix tomorrow.

I wonder why this resulted in a regression. You would assume that an invalid fill would be treated as no fill at all, with the background remaining transparent. That's how invalid CSS rules are handled, but maybe SVG is handled differently.

janko commented 1 year ago

Yeah, I was also surprised 🤷🏻‍♂️

gismoog commented 1 year ago

Thanx for the quick fix Jeremy.