Skip to content

Commit a2dfa4f

Browse files
prajapati-kaushikjoostfaassen
authored andcommitted
feat: use base64 encoded usernames/email addresses when fetching user data #2463
1 parent 37127e8 commit a2dfa4f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Client.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public function getUserByUsername($username)
227227

228228
$dataCache = $this->cache->getItem($cacheKey);
229229
if (!$dataCache->isHit()) {
230+
$username = 'base64:'.base64_encode($username);
230231
$data = $this->getData('/users/'.$username);
231232
if (isset($data['error'])) {
232233
throw new RuntimeException('User not found: '.$username);

0 commit comments

Comments
 (0)