{"action":"opened","issue":{"url":"https://api.github.com/repos/bkimminich/juice-shop/issues/669","repository_url":"https://api.github.com/repos/bkimminich/juice-shop","labels_url":"https://api.github.com/repos/bkimminich/juice-shop/issues/669/labels{/name}","comments_url":"https://api.github.com/repos/bkimminich/juice-shop/issues/669/comments","events_url":"https://api.github.com/repos/bkimminich/juice-shop/issues/669/events","html_url":"https://github.com/bkimminich/juice-shop/issues/669","id":350071329,"node_id":"MDU6SXNzdWUzNTAwNzEzMjk=","number":669,"title":"Downloading configured favicon can break server on startup","user":{"login":"bkimminich","id":3531020,"node_id":"MDQ6VXNlcjM1MzEwMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/3531020?v=4","gravatar_id":"","url":"https://api.github.com/users/bkimminich","html_url":"https://github.com/bkimminich","followers_url":"https://api.github.com/users/bkimminich/followers","following_url":"https://api.github.com/users/bkimminich/following{/other_user}","gists_url":"https://api.github.com/users/bkimminich/gists{/gist_id}","starred_url":"https://api.github.com/users/bkimminich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkimminich/subscriptions","organizations_url":"https://api.github.com/users/bkimminich/orgs","repos_url":"https://api.github.com/users/bkimminich/repos","events_url":"https://api.github.com/users/bkimminich/events{/privacy}","received_events_url":"https://api.github.com/users/bkimminich/received_events","type":"User","site_admin":false},"labels":[{"id":130877349,"node_id":"MDU6TGFiZWwxMzA4NzczNDk=","url":"https://api.github.com/repos/bkimminich/juice-shop/labels/bug","name":"bug","color":"fc2929","default":true},{"id":1023045897,"node_id":"MDU6TGFiZWwxMDIzMDQ1ODk3","url":"https://api.github.com/repos/bkimminich/juice-shop/labels/customization","name":"customization","color":"0052cc","default":false},{"id":497710089,"node_id":"MDU6TGFiZWw0OTc3MTAwODk=","url":"https://api.github.com/repos/bkimminich/juice-shop/labels/good%20first%20issue","name":"good first issue","color":"5319e7","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-13T15:09:10Z","updated_at":"2018-08-13T15:09:10Z","closed_at":null,"author_association":"OWNER","body":"The following code from `server.js` will run into errors similar to `Error: ENOENT: no such file or directory, stat 'C:\\Data\\juice-shop\\app\\public\\favicon.ico'` if (and only if) a configured `application.favicon` is slow (or fails) to be downloaded.\r\n\r\n```\r\n/* Favicon */\r\nlet icon = 'favicon_v2.ico'\r\nif (config.get('application.favicon')) {\r\n  icon = config.get('application.favicon')\r\n  if (utils.startsWith(icon, 'http')) {\r\n    const iconPath = icon\r\n    icon = decodeURIComponent(icon.substring(icon.lastIndexOf('/') + 1))\r\n    utils.downloadToFile(iconPath, 'app/public/' + icon)\r\n  }\r\n}\r\napp.use(favicon(path.join(__dirname, 'app/public/' + icon)))\r\n```\r\n\r\n## Test cases\r\n\r\n:heavy_check_mark: `mozilla.yml` reliably works fine\r\n:x: `7ms.yml` fails on startup with above error"}}
{"actor":{"display_login":"bkimminich"}}