{"action":"created","comment":{"url":"https://api.github.com/repos/kelleydv/Bapa/pulls/comments/25717053","id":25717053,"diff_hunk":"@@ -0,0 +1,63 @@\n+from bapa import models\n+from bapa.utils import timestamp,is_too_old, get_salt\n+from bapa.utils import object_from_timestamp, get_hash\n+from bapa import app, mail\n+from flask_mail import Message\n+\n+\n+def reset_password_request(ushpa, email, url):\n+    \"\"\"Send an email to the user with a secret hash url\"\"\"\n+    if not (ushpa and email):\n+        return 'Please enter your USHPA pilot number and email address'\n+    elif not (email and '@' in email and '.' in email):","path":"bapa/modules/password/controllers.py","position":12,"original_position":12,"commit_id":"1f56a2bdb59594dd48cacb103e6bd3ed3760a44d","original_commit_id":"1f56a2bdb59594dd48cacb103e6bd3ed3760a44d","user":{"login":"jakiestfu","id":1041792,"avatar_url":"https://avatars.githubusercontent.com/u/1041792?v=3","gravatar_id":"","url":"https://api.github.com/users/jakiestfu","html_url":"https://github.com/jakiestfu","followers_url":"https://api.github.com/users/jakiestfu/followers","following_url":"https://api.github.com/users/jakiestfu/following{/other_user}","gists_url":"https://api.github.com/users/jakiestfu/gists{/gist_id}","starred_url":"https://api.github.com/users/jakiestfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakiestfu/subscriptions","organizations_url":"https://api.github.com/users/jakiestfu/orgs","repos_url":"https://api.github.com/users/jakiestfu/repos","events_url":"https://api.github.com/users/jakiestfu/events{/privacy}","received_events_url":"https://api.github.com/users/jakiestfu/received_events","type":"User","site_admin":false},"body":"This is a very lax check for a valid email. The most you can really do is check that there is one character, followed by an @ symbol, followed by one character, followed by a . symbol, followed by at least two characters (for the domain extension). I know you're aware of this and I assume this was just a quick thing you wanted to do.","created_at":"2015-03-03T19:19:58Z","updated_at":"2015-03-03T19:19:58Z","html_url":"https://github.com/kelleydv/Bapa/pull/5#discussion_r25717053","pull_request_url":"https://api.github.com/repos/kelleydv/Bapa/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/comments/25717053"},"html":{"href":"https://github.com/kelleydv/Bapa/pull/5#discussion_r25717053"},"pull_request":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/kelleydv/Bapa/pulls/5","id":29863979,"html_url":"https://github.com/kelleydv/Bapa/pull/5","diff_url":"https://github.com/kelleydv/Bapa/pull/5.diff","patch_url":"https://github.com/kelleydv/Bapa/pull/5.patch","issue_url":"https://api.github.com/repos/kelleydv/Bapa/issues/5","number":5,"state":"closed","locked":false,"title":"Email","user":{"login":"kelleydv","id":3460428,"avatar_url":"https://avatars.githubusercontent.com/u/3460428?v=3","gravatar_id":"","url":"https://api.github.com/users/kelleydv","html_url":"https://github.com/kelleydv","followers_url":"https://api.github.com/users/kelleydv/followers","following_url":"https://api.github.com/users/kelleydv/following{/other_user}","gists_url":"https://api.github.com/users/kelleydv/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleydv/subscriptions","organizations_url":"https://api.github.com/users/kelleydv/orgs","repos_url":"https://api.github.com/users/kelleydv/repos","events_url":"https://api.github.com/users/kelleydv/events{/privacy}","received_events_url":"https://api.github.com/users/kelleydv/received_events","type":"User","site_admin":false},"body":"I created this branch to implement transactional email in the website.  Email functionality is working via [Postmark](https://postmarkapp.com).  It remains to dial-in the password reset logic.","created_at":"2015-02-24T01:36:28Z","updated_at":"2015-03-03T19:19:59Z","closed_at":"2015-03-03T19:13:40Z","merged_at":"2015-03-03T19:13:40Z","merge_commit_sha":"db06ddc01e4e1f17ad6fe86a918e3f27adbc2e12","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kelleydv/Bapa/pulls/5/commits","review_comments_url":"https://api.github.com/repos/kelleydv/Bapa/pulls/5/comments","review_comment_url":"https://api.github.com/repos/kelleydv/Bapa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kelleydv/Bapa/issues/5/comments","statuses_url":"https://api.github.com/repos/kelleydv/Bapa/statuses/1f56a2bdb59594dd48cacb103e6bd3ed3760a44d","head":{"label":"kelleydv:email","ref":"email","sha":"1f56a2bdb59594dd48cacb103e6bd3ed3760a44d","user":{"login":"kelleydv","id":3460428,"avatar_url":"https://avatars.githubusercontent.com/u/3460428?v=3","gravatar_id":"","url":"https://api.github.com/users/kelleydv","html_url":"https://github.com/kelleydv","followers_url":"https://api.github.com/users/kelleydv/followers","following_url":"https://api.github.com/users/kelleydv/following{/other_user}","gists_url":"https://api.github.com/users/kelleydv/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleydv/subscriptions","organizations_url":"https://api.github.com/users/kelleydv/orgs","repos_url":"https://api.github.com/users/kelleydv/repos","events_url":"https://api.github.com/users/kelleydv/events{/privacy}","received_events_url":"https://api.github.com/users/kelleydv/received_events","type":"User","site_admin":false},"repo":{"id":29284664,"name":"Bapa","full_name":"kelleydv/Bapa","owner":{"login":"kelleydv","id":3460428,"avatar_url":"https://avatars.githubusercontent.com/u/3460428?v=3","gravatar_id":"","url":"https://api.github.com/users/kelleydv","html_url":"https://github.com/kelleydv","followers_url":"https://api.github.com/users/kelleydv/followers","following_url":"https://api.github.com/users/kelleydv/following{/other_user}","gists_url":"https://api.github.com/users/kelleydv/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleydv/subscriptions","organizations_url":"https://api.github.com/users/kelleydv/orgs","repos_url":"https://api.github.com/users/kelleydv/repos","events_url":"https://api.github.com/users/kelleydv/events{/privacy}","received_events_url":"https://api.github.com/users/kelleydv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kelleydv/Bapa","description":"","fork":false,"url":"https://api.github.com/repos/kelleydv/Bapa","forks_url":"https://api.github.com/repos/kelleydv/Bapa/forks","keys_url":"https://api.github.com/repos/kelleydv/Bapa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kelleydv/Bapa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kelleydv/Bapa/teams","hooks_url":"https://api.github.com/repos/kelleydv/Bapa/hooks","issue_events_url":"https://api.github.com/repos/kelleydv/Bapa/issues/events{/number}","events_url":"https://api.github.com/repos/kelleydv/Bapa/events","assignees_url":"https://api.github.com/repos/kelleydv/Bapa/assignees{/user}","branches_url":"https://api.github.com/repos/kelleydv/Bapa/branches{/branch}","tags_url":"https://api.github.com/repos/kelleydv/Bapa/tags","blobs_url":"https://api.github.com/repos/kelleydv/Bapa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kelleydv/Bapa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kelleydv/Bapa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kelleydv/Bapa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kelleydv/Bapa/statuses/{sha}","languages_url":"https://api.github.com/repos/kelleydv/Bapa/languages","stargazers_url":"https://api.github.com/repos/kelleydv/Bapa/stargazers","contributors_url":"https://api.github.com/repos/kelleydv/Bapa/contributors","subscribers_url":"https://api.github.com/repos/kelleydv/Bapa/subscribers","subscription_url":"https://api.github.com/repos/kelleydv/Bapa/subscription","commits_url":"https://api.github.com/repos/kelleydv/Bapa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kelleydv/Bapa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kelleydv/Bapa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kelleydv/Bapa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kelleydv/Bapa/contents/{+path}","compare_url":"https://api.github.com/repos/kelleydv/Bapa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kelleydv/Bapa/merges","archive_url":"https://api.github.com/repos/kelleydv/Bapa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kelleydv/Bapa/downloads","issues_url":"https://api.github.com/repos/kelleydv/Bapa/issues{/number}","pulls_url":"https://api.github.com/repos/kelleydv/Bapa/pulls{/number}","milestones_url":"https://api.github.com/repos/kelleydv/Bapa/milestones{/number}","notifications_url":"https://api.github.com/repos/kelleydv/Bapa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kelleydv/Bapa/labels{/name}","releases_url":"https://api.github.com/repos/kelleydv/Bapa/releases{/id}","created_at":"2015-01-15T06:45:49Z","updated_at":"2015-03-03T19:15:38Z","pushed_at":"2015-03-03T19:15:38Z","git_url":"git://github.com/kelleydv/Bapa.git","ssh_url":"git@github.com:kelleydv/Bapa.git","clone_url":"https://github.com/kelleydv/Bapa.git","svn_url":"https://github.com/kelleydv/Bapa","homepage":null,"size":309,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"kelleydv:develop","ref":"develop","sha":"6e8d7c7d41afdff823703999e6a50a14faa4f3ea","user":{"login":"kelleydv","id":3460428,"avatar_url":"https://avatars.githubusercontent.com/u/3460428?v=3","gravatar_id":"","url":"https://api.github.com/users/kelleydv","html_url":"https://github.com/kelleydv","followers_url":"https://api.github.com/users/kelleydv/followers","following_url":"https://api.github.com/users/kelleydv/following{/other_user}","gists_url":"https://api.github.com/users/kelleydv/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleydv/subscriptions","organizations_url":"https://api.github.com/users/kelleydv/orgs","repos_url":"https://api.github.com/users/kelleydv/repos","events_url":"https://api.github.com/users/kelleydv/events{/privacy}","received_events_url":"https://api.github.com/users/kelleydv/received_events","type":"User","site_admin":false},"repo":{"id":29284664,"name":"Bapa","full_name":"kelleydv/Bapa","owner":{"login":"kelleydv","id":3460428,"avatar_url":"https://avatars.githubusercontent.com/u/3460428?v=3","gravatar_id":"","url":"https://api.github.com/users/kelleydv","html_url":"https://github.com/kelleydv","followers_url":"https://api.github.com/users/kelleydv/followers","following_url":"https://api.github.com/users/kelleydv/following{/other_user}","gists_url":"https://api.github.com/users/kelleydv/gists{/gist_id}","starred_url":"https://api.github.com/users/kelleydv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelleydv/subscriptions","organizations_url":"https://api.github.com/users/kelleydv/orgs","repos_url":"https://api.github.com/users/kelleydv/repos","events_url":"https://api.github.com/users/kelleydv/events{/privacy}","received_events_url":"https://api.github.com/users/kelleydv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kelleydv/Bapa","description":"","fork":false,"url":"https://api.github.com/repos/kelleydv/Bapa","forks_url":"https://api.github.com/repos/kelleydv/Bapa/forks","keys_url":"https://api.github.com/repos/kelleydv/Bapa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kelleydv/Bapa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kelleydv/Bapa/teams","hooks_url":"https://api.github.com/repos/kelleydv/Bapa/hooks","issue_events_url":"https://api.github.com/repos/kelleydv/Bapa/issues/events{/number}","events_url":"https://api.github.com/repos/kelleydv/Bapa/events","assignees_url":"https://api.github.com/repos/kelleydv/Bapa/assignees{/user}","branches_url":"https://api.github.com/repos/kelleydv/Bapa/branches{/branch}","tags_url":"https://api.github.com/repos/kelleydv/Bapa/tags","blobs_url":"https://api.github.com/repos/kelleydv/Bapa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kelleydv/Bapa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kelleydv/Bapa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kelleydv/Bapa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kelleydv/Bapa/statuses/{sha}","languages_url":"https://api.github.com/repos/kelleydv/Bapa/languages","stargazers_url":"https://api.github.com/repos/kelleydv/Bapa/stargazers","contributors_url":"https://api.github.com/repos/kelleydv/Bapa/contributors","subscribers_url":"https://api.github.com/repos/kelleydv/Bapa/subscribers","subscription_url":"https://api.github.com/repos/kelleydv/Bapa/subscription","commits_url":"https://api.github.com/repos/kelleydv/Bapa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kelleydv/Bapa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kelleydv/Bapa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kelleydv/Bapa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kelleydv/Bapa/contents/{+path}","compare_url":"https://api.github.com/repos/kelleydv/Bapa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kelleydv/Bapa/merges","archive_url":"https://api.github.com/repos/kelleydv/Bapa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kelleydv/Bapa/downloads","issues_url":"https://api.github.com/repos/kelleydv/Bapa/issues{/number}","pulls_url":"https://api.github.com/repos/kelleydv/Bapa/pulls{/number}","milestones_url":"https://api.github.com/repos/kelleydv/Bapa/milestones{/number}","notifications_url":"https://api.github.com/repos/kelleydv/Bapa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kelleydv/Bapa/labels{/name}","releases_url":"https://api.github.com/repos/kelleydv/Bapa/releases{/id}","created_at":"2015-01-15T06:45:49Z","updated_at":"2015-03-03T19:15:38Z","pushed_at":"2015-03-03T19:15:38Z","git_url":"git://github.com/kelleydv/Bapa.git","ssh_url":"git@github.com:kelleydv/Bapa.git","clone_url":"https://github.com/kelleydv/Bapa.git","svn_url":"https://github.com/kelleydv/Bapa","homepage":null,"size":309,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/5"},"html":{"href":"https://github.com/kelleydv/Bapa/pull/5"},"issue":{"href":"https://api.github.com/repos/kelleydv/Bapa/issues/5"},"comments":{"href":"https://api.github.com/repos/kelleydv/Bapa/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kelleydv/Bapa/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/kelleydv/Bapa/statuses/1f56a2bdb59594dd48cacb103e6bd3ed3760a44d"}}}}