{"comment":{"url":"https://api.github.com/repos/BOINC/boinc/comments/14485121","html_url":"https://github.com/BOINC/boinc/commit/582f389f391bcb8e6e95889d9f61cbaf57f5a8f7#commitcomment-14485121","id":14485121,"user":{"login":"JuhaSointusalo","id":15806192,"avatar_url":"https://avatars.githubusercontent.com/u/15806192?v=3","gravatar_id":"","url":"https://api.github.com/users/JuhaSointusalo","html_url":"https://github.com/JuhaSointusalo","followers_url":"https://api.github.com/users/JuhaSointusalo/followers","following_url":"https://api.github.com/users/JuhaSointusalo/following{/other_user}","gists_url":"https://api.github.com/users/JuhaSointusalo/gists{/gist_id}","starred_url":"https://api.github.com/users/JuhaSointusalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuhaSointusalo/subscriptions","organizations_url":"https://api.github.com/users/JuhaSointusalo/orgs","repos_url":"https://api.github.com/users/JuhaSointusalo/repos","events_url":"https://api.github.com/users/JuhaSointusalo/events{/privacy}","received_events_url":"https://api.github.com/users/JuhaSointusalo/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"582f389f391bcb8e6e95889d9f61cbaf57f5a8f7","created_at":"2015-11-18T22:15:28Z","updated_at":"2015-11-18T22:15:28Z","body":"I don't know what you were trying to fix but this has a few problems.\r\n\r\nchar is a signed type so everything above 127 wraps to negative. This breaks everything that isn't fully US ASCII like user or team names.\r\n\r\nThis also doesn't prevent control characters from appearing in the un-escaped string. The control characters may not be escaped in the first place! Besides, I don't think low-level function like this should be doing any filtering. It should be the higher levels that decide what they can accept. For example, this accepts '/' but you wouldn't want that in file names. On the other hand, you can have '/' pretty much everywhere else. IMHO, if there is some other part in BOINC that can't handle control characters then the fix should be there, not here.\r\n\r\nThat dropping of unaccepted characters makes be a bit nervous. If there is something that can't be un-escaped I'd rather be paranoid and have the function reject the input string entirely and return an error code."}}