diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-11-02 13:27:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-11-02 13:27:35 +0800 |
| commit | 0a84873f68a4f79095de338a3234162dde02f943 (patch) | |
| tree | 114134d74b881f53a4c4d0b4058a47354e289e64 /src | |
| parent | b9f52bd2fc436a8260ccab591319526ff94bb90d (diff) | |
fixed secret & id leak vuln by using default with limit(deleted secret and id)
Diffstat (limited to 'src')
| -rw-r--r-- | src/js/getrepo.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/js/getrepo.js b/src/js/getrepo.js index d34104a2..840c4560 100644 --- a/src/js/getrepo.js +++ b/src/js/getrepo.js @@ -1,6 +1,4 @@ const username = 'littleblack111'; -const clientId = '8aa6ec904eca5e0bc1e3' -const clientSecret = 'b9ac8092b0b95f86871f5d1da81f666146d71200'; const hideForks = true; const repoList = document.querySelector('.repo-list'); const reposSection = document.querySelector('.repos'); @@ -10,13 +8,6 @@ const filterInput = document.querySelector('.filter-repos'); const getProfile = async () => { const res = await fetch( `https://api.github.com/users/${username}`, - { - headers: { - Accept: 'application/vnd.github+json', - Authorization: //'token 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' - `Basic ${btoa(`${clientId}:${clientSecret}`)}` - } - } ); const profile = await res.json(); displayProfile(profile); @@ -56,14 +47,6 @@ const getRepos = async () => { let res; res = await fetch( `https://api.github.com/users/${username}/repos?&sort=pushed`, - { - headers: { - Accept: 'application/vnd.github+json', - Authorization: - `Basic ${btoa(`${clientId}:${clientSecret}`)}` - // 'token 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' - } - } ); let data = await res.json(); repos = repos.concat(data); |
