Skip to content

Commit

Permalink
Restrain public files to the public/ folder
Browse files Browse the repository at this point in the history
As raised by Adriaan (@agboom), the .github-user-tokens.json file was
incorrectly exposed, causing the risk of users' GitHub tokens to be used
by other entities for the purpose of increasing their rate limits by
pretending to be shields.io.
  • Loading branch information
espadrine committed Feb 5, 2017
1 parent 8272913 commit 6258968
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://rawgit.com/badges/shields/master/logo.svg"
<img src="https://rawgit.com/badges/shields/master/public/logo.svg"
height="130">
</p>
<p align="center">
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions public/favicon.png
1 change: 1 addition & 0 deletions public/index.html
File renamed without changes
1 change: 1 addition & 0 deletions public/try.html
3 changes: 2 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ var serverPort = +process.env.PORT || +process.argv[2] || (secureServer? 443: 80
var bindAddress = process.env.BIND_ADDRESS || process.argv[3] || '::';
var infoSite = process.env.INFOSITE || "http://shields.io";
var githubApiUrl = process.env.GITHUB_URL || 'https://api.github.com';
var path = require('path');
var Camp = require('camp');
var camp = Camp.start({
documentRoot: __dirname,
documentRoot: path.join(__dirname, 'public'),
port: serverPort,
hostname: bindAddress,
secure: secureServer
Expand Down

0 comments on commit 6258968

Please sign in to comment.