{"action":"created","issue":{"url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/97","repository_url":"https://api.github.com/repos/chrahunt/TagProReplays","labels_url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/97/comments","events_url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/97/events","html_url":"https://github.com/chrahunt/TagProReplays/issues/97","id":189891260,"number":97,"title":"Add replay format validation","user":{"login":"chrahunt","id":2312275,"avatar_url":"https://avatars.githubusercontent.com/u/2312275?v=3","gravatar_id":"","url":"https://api.github.com/users/chrahunt","html_url":"https://github.com/chrahunt","followers_url":"https://api.github.com/users/chrahunt/followers","following_url":"https://api.github.com/users/chrahunt/following{/other_user}","gists_url":"https://api.github.com/users/chrahunt/gists{/gist_id}","starred_url":"https://api.github.com/users/chrahunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrahunt/subscriptions","organizations_url":"https://api.github.com/users/chrahunt/orgs","repos_url":"https://api.github.com/users/chrahunt/repos","events_url":"https://api.github.com/users/chrahunt/events{/privacy}","received_events_url":"https://api.github.com/users/chrahunt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-17T00:07:03Z","updated_at":"2016-12-10T01:55:33Z","closed_at":null,"body":"Using schemas from [here](https://github.com/chrahunt/TagProReplays/tree/dev/src/schemas/1). [ajv](https://github.com/epoberezkin/ajv) looks like a good option for a validator.\r\n\r\nPlaces where validation needs to happen:\r\n- [ ] On saving a replay from within the game. If the validation fails then we should download the replay content and return 'failed' to the user.\r\n- [ ] On import. If a replay to be imported fails validation we can display an alert that must be dismissed before the import will continue.\r\n\r\nThe schemas need to be updated to account for the powerup message difference seen in #77."},"comment":{"url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/comments/266170435","html_url":"https://github.com/chrahunt/TagProReplays/issues/97#issuecomment-266170435","issue_url":"https://api.github.com/repos/chrahunt/TagProReplays/issues/97","id":266170435,"user":{"login":"chrahunt","id":2312275,"avatar_url":"https://avatars.githubusercontent.com/u/2312275?v=3","gravatar_id":"","url":"https://api.github.com/users/chrahunt","html_url":"https://github.com/chrahunt","followers_url":"https://api.github.com/users/chrahunt/followers","following_url":"https://api.github.com/users/chrahunt/following{/other_user}","gists_url":"https://api.github.com/users/chrahunt/gists{/gist_id}","starred_url":"https://api.github.com/users/chrahunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrahunt/subscriptions","organizations_url":"https://api.github.com/users/chrahunt/orgs","repos_url":"https://api.github.com/users/chrahunt/repos","events_url":"https://api.github.com/users/chrahunt/events{/privacy}","received_events_url":"https://api.github.com/users/chrahunt/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T01:55:33Z","updated_at":"2016-12-10T01:55:33Z","body":"1 small problem, the default (and unoverridable) CSP applied to the background page does not allow for unsafe-eval, so I need to either:\r\n\r\n1. put ajv into a [sandbox page](https://developer.chrome.com/extensions/sandboxingEval) or\r\n2. pre-compile the validator with [ajv-cli](https://github.com/jessedc/ajv-cli#compile-schemas)\r\n\r\nI'm leaning towards the former option since I can see a nicer way to make it work."}}
{"actor":{"display_login":"chrahunt"}}