{"action":"created","issue":{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/486","labels_url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/486/comments","events_url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/486/events","html_url":"https://github.com/OpenUserJs/OpenUserJS.org/issues/486","id":51185728,"number":486,"title":"Normalize username casing for DB storage","user":{"login":"Martii","id":114709,"avatar_url":"https://avatars.githubusercontent.com/u/114709?v=3","gravatar_id":"","url":"https://api.github.com/users/Martii","html_url":"https://github.com/Martii","followers_url":"https://api.github.com/users/Martii/followers","following_url":"https://api.github.com/users/Martii/following{/other_user}","gists_url":"https://api.github.com/users/Martii/gists{/gist_id}","starred_url":"https://api.github.com/users/Martii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martii/subscriptions","organizations_url":"https://api.github.com/users/Martii/orgs","repos_url":"https://api.github.com/users/Martii/repos","events_url":"https://api.github.com/users/Martii/events{/privacy}","received_events_url":"https://api.github.com/users/Martii/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/CODE","name":"CODE","color":"006b75"},{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/DB","name":"DB","color":"006b75"},{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/migration","name":"migration","color":"610b5e"},{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/needs%20discussion","name":"needs discussion","color":"2efef7"},{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/labels/team%20biz","name":"team biz","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-12-06T15:11:09Z","updated_at":"2015-04-27T07:36:15Z","closed_at":null,"body":"Currently we are unable to upgrade the *aws-sdk* dependency because \"something\" changed that makes [`getObject`](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getObject-property) to fail.\r\n\r\nThis has been explained in detail at aws/aws-sdk-js#430 . With all the test deploys done trying to figure out what the steps to reproduce are it appears that normalizing the casing when we save to the DB is an option.\r\n\r\nLooking for more options related to advancing the goal of updating the dep... e.g. perhaps we could validate the current `aReq.params.username` against the real username *(name)* that is typically in the Raw JSON Data for an account. e.g. a lookup to correct the casing [around here](/OpenUserJs/OpenUserJS.org/blob/e0a03458f957cb199227e2ce033a6d14103cc2a1/controllers/scriptStorage.js#L47-L61)... but I suspect this is going to need to be a DB migration with a BLOCKING label until it is finished.\r\n\r\nSee also:\r\n* https://github.com/aws/aws-sdk-js/issues/397#issuecomment-60807108 error trap suggestion for loosely related\r\n* https://github.com/OpenUserJs/OpenUserJS.org/blob/71ef808762ccf14a048c8a639d6d620e4e4e91e4/controllers/script.js#L350 Probably related and should be fixed\r\n\r\nTest points:\r\n* https://openuserjs.org/scripts/Marti/oujs_-_Meta_View/source vs https://openuserjs.org/scripts/marti/oujs_-_Meta_View/source e.g. manual url entry in the addy bar\r\n* https://openuserjs.org/scripts/JRI/Geocaching_Map_Enhancements/source Since `jri` is currently in the DB not `JRI`"},"comment":{"url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/comments/96536425","html_url":"https://github.com/OpenUserJs/OpenUserJS.org/issues/486#issuecomment-96536425","issue_url":"https://api.github.com/repos/OpenUserJs/OpenUserJS.org/issues/486","id":96536425,"user":{"login":"sizzlemctwizzle","id":35782,"avatar_url":"https://avatars.githubusercontent.com/u/35782?v=3","gravatar_id":"","url":"https://api.github.com/users/sizzlemctwizzle","html_url":"https://github.com/sizzlemctwizzle","followers_url":"https://api.github.com/users/sizzlemctwizzle/followers","following_url":"https://api.github.com/users/sizzlemctwizzle/following{/other_user}","gists_url":"https://api.github.com/users/sizzlemctwizzle/gists{/gist_id}","starred_url":"https://api.github.com/users/sizzlemctwizzle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sizzlemctwizzle/subscriptions","organizations_url":"https://api.github.com/users/sizzlemctwizzle/orgs","repos_url":"https://api.github.com/users/sizzlemctwizzle/repos","events_url":"https://api.github.com/users/sizzlemctwizzle/events{/privacy}","received_events_url":"https://api.github.com/users/sizzlemctwizzle/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T07:36:15Z","updated_at":"2015-04-27T07:36:15Z","body":"I have no problem with a temporary fix, but we definitely need to migrate the scripts in S3 to use `script._id` instead of the path value somewhere  down the line. It's a simple migration but I'm always afraid I'm going to break something when I mess with S3. I spend hours trying to get everything right when I removed namespaces."}}