- Issue created by @josh.fabean
- Merge request !20Issue #3532841: Invites that are generated can be invalid paths β (Open) created by josh.fabean
- πΊπΈUnited States josh.fabean
Created method to generate URL safe codes.
protected static function generateUrlSafeCode(int $length): string { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $code = ''; for ($i = 0; $i < $length; $i++) { $code .= $chars[random_int(0, strlen($chars) - 1)]; } return $code; }
- π§π·Brazil renatog Campinas
Maybe the solution on #3 works, however just as a curiosity, isnβt possible implementing this with Regex?
- π§π·Brazil renatog Campinas
NVM, please ignore my question above. Regex is for matching, not creating
So seems good, thanks