{"action":"created","issue":{"url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/1271","repository_url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth","labels_url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/1271/labels{/name}","comments_url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/1271/comments","events_url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/1271/events","html_url":"https://github.com/benedmunds/CodeIgniter-Ion-Auth/issues/1271","id":362926043,"node_id":"MDU6SXNzdWUzNjI5MjYwNDM=","number":1271,"title":"Activation codes are problematic to be used in a URL ","user":{"login":"phalox","id":3983738,"node_id":"MDQ6VXNlcjM5ODM3Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/3983738?v=4","gravatar_id":"","url":"https://api.github.com/users/phalox","html_url":"https://github.com/phalox","followers_url":"https://api.github.com/users/phalox/followers","following_url":"https://api.github.com/users/phalox/following{/other_user}","gists_url":"https://api.github.com/users/phalox/gists{/gist_id}","starred_url":"https://api.github.com/users/phalox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phalox/subscriptions","organizations_url":"https://api.github.com/users/phalox/orgs","repos_url":"https://api.github.com/users/phalox/repos","events_url":"https://api.github.com/users/phalox/events{/privacy}","received_events_url":"https://api.github.com/users/phalox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-09-23T08:59:36Z","updated_at":"2018-10-15T20:17:41Z","closed_at":null,"author_association":"NONE","body":"An activation code, you would typically send via an email, and append to a URL.\r\nBut it seems that the algorithm used is generating characters that are not allowed:\r\n\r\ne.g.\r\n$2y$10$hSl57gPMjTfIPf0sv5ic3.WTC2nWpfbwRAqsFd8T/2xzjNWrBPgKi\r\n\r\n$ signs are by default not allowed in a CI URL. Fixed by replacing with \":\", and doing so again in the other direction.\r\n/ (forward slash) is a valid output, and this causes the URL parameter to be broken up in 2 parts.\r\n\r\nIt also seems that the register() function is simply using this variable and adding it to the URL, which I believe will give issues in many cases?\r\nFrom what I can see, this will be an issue in both hashing cases...\r\n\r\nThe easiest fix would be to use urlencode(), but it adds characters that make the URL look strange to the user. Or finding a different way for an activation key. In the end it's just used as an identifier that's stored entirely in the database. I don't see why you need special crypto for this. Just a good amount of length."},"comment":{"url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/comments/429997951","html_url":"https://github.com/benedmunds/CodeIgniter-Ion-Auth/issues/1271#issuecomment-429997951","issue_url":"https://api.github.com/repos/benedmunds/CodeIgniter-Ion-Auth/issues/1271","id":429997951,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTk5Nzk1MQ==","user":{"login":"Indigo744","id":7137528,"node_id":"MDQ6VXNlcjcxMzc1Mjg=","avatar_url":"https://avatars3.githubusercontent.com/u/7137528?v=4","gravatar_id":"","url":"https://api.github.com/users/Indigo744","html_url":"https://github.com/Indigo744","followers_url":"https://api.github.com/users/Indigo744/followers","following_url":"https://api.github.com/users/Indigo744/following{/other_user}","gists_url":"https://api.github.com/users/Indigo744/gists{/gist_id}","starred_url":"https://api.github.com/users/Indigo744/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Indigo744/subscriptions","organizations_url":"https://api.github.com/users/Indigo744/orgs","repos_url":"https://api.github.com/users/Indigo744/repos","events_url":"https://api.github.com/users/Indigo744/events{/privacy}","received_events_url":"https://api.github.com/users/Indigo744/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T20:17:41Z","updated_at":"2018-10-15T20:17:41Z","author_association":"CONTRIBUTOR","body":"@benedmunds @phalox please check #1277 "}}
{"actor":{"display_login":"Indigo744"}}