{"action":"created","comment":{"url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/comments/61798242","id":61798242,"diff_hunk":"@@ -443,6 +446,34 @@ def contact_status(PCID):\n     else:\n         return redirect(url_for('librarian'))\n \n+\n+@app.route('/changepassword', methods=['GET', 'POST'])\n+@login_required\n+def changepassword():\n+    if request.method == 'POST':\n+        user = Staff.query.get(session['logged_in_name'])\n+        if user is None:\n+            flash(\"Server error\")\n+            return redirect(url_for('main'))\n+\n+        if user.password != request.form.get('oldpass'):\n+            flash(\"Password verification failed\")\n+        else:\n+            newpass = request.form.get('newpass', '').strip()\n+            #XXX: password requirements?\n+            #     validate decorator in Staff","path":"library.py","position":38,"original_position":38,"commit_id":"fb1b08aa7b3c8e1f7d2dd5b05bbc84afcdf4aa51","original_commit_id":"fb1b08aa7b3c8e1f7d2dd5b05bbc84afcdf4aa51","user":{"login":"hitbox","id":1570837,"avatar_url":"https://avatars.githubusercontent.com/u/1570837?v=3","gravatar_id":"","url":"https://api.github.com/users/hitbox","html_url":"https://github.com/hitbox","followers_url":"https://api.github.com/users/hitbox/followers","following_url":"https://api.github.com/users/hitbox/following{/other_user}","gists_url":"https://api.github.com/users/hitbox/gists{/gist_id}","starred_url":"https://api.github.com/users/hitbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitbox/subscriptions","organizations_url":"https://api.github.com/users/hitbox/orgs","repos_url":"https://api.github.com/users/hitbox/repos","events_url":"https://api.github.com/users/hitbox/events{/privacy}","received_events_url":"https://api.github.com/users/hitbox/received_events","type":"User","site_admin":false},"body":"Thinking password validation would be better in the database model.","created_at":"2016-05-02T20:27:55Z","updated_at":"2016-05-02T20:27:55Z","html_url":"https://github.com/CincyPy/LibraryWebsite/pull/59#discussion_r61798242","pull_request_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59","_links":{"self":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/comments/61798242"},"html":{"href":"https://github.com/CincyPy/LibraryWebsite/pull/59#discussion_r61798242"},"pull_request":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59","id":68601652,"html_url":"https://github.com/CincyPy/LibraryWebsite/pull/59","diff_url":"https://github.com/CincyPy/LibraryWebsite/pull/59.diff","patch_url":"https://github.com/CincyPy/LibraryWebsite/pull/59.patch","issue_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/59","number":59,"state":"open","locked":false,"title":"Issue 57: Change password page and hash passwords","user":{"login":"hitbox","id":1570837,"avatar_url":"https://avatars.githubusercontent.com/u/1570837?v=3","gravatar_id":"","url":"https://api.github.com/users/hitbox","html_url":"https://github.com/hitbox","followers_url":"https://api.github.com/users/hitbox/followers","following_url":"https://api.github.com/users/hitbox/following{/other_user}","gists_url":"https://api.github.com/users/hitbox/gists{/gist_id}","starred_url":"https://api.github.com/users/hitbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitbox/subscriptions","organizations_url":"https://api.github.com/users/hitbox/orgs","repos_url":"https://api.github.com/users/hitbox/repos","events_url":"https://api.github.com/users/hitbox/events{/privacy}","received_events_url":"https://api.github.com/users/hitbox/received_events","type":"User","site_admin":false},"body":"- Added change password button on \"Edit Profile\" page.\r\n- Password change requires re-login. (do we want that?)\r\n- Passwors are now hashed on the Python side--meaning we can't do password comparisons in the SQLAlchemy queries (see tests).\r\n- Require stronger passwords?","created_at":"2016-05-02T18:44:41Z","updated_at":"2016-05-02T20:27:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51652a10dd8ee108dade0640111451eee9c93b89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59/commits","review_comments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59/comments","review_comment_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/59/comments","statuses_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/statuses/fb1b08aa7b3c8e1f7d2dd5b05bbc84afcdf4aa51","head":{"label":"CincyPy:iss57-change-pass-and-hash","ref":"iss57-change-pass-and-hash","sha":"fb1b08aa7b3c8e1f7d2dd5b05bbc84afcdf4aa51","user":{"login":"CincyPy","id":12663130,"avatar_url":"https://avatars.githubusercontent.com/u/12663130?v=3","gravatar_id":"","url":"https://api.github.com/users/CincyPy","html_url":"https://github.com/CincyPy","followers_url":"https://api.github.com/users/CincyPy/followers","following_url":"https://api.github.com/users/CincyPy/following{/other_user}","gists_url":"https://api.github.com/users/CincyPy/gists{/gist_id}","starred_url":"https://api.github.com/users/CincyPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CincyPy/subscriptions","organizations_url":"https://api.github.com/users/CincyPy/orgs","repos_url":"https://api.github.com/users/CincyPy/repos","events_url":"https://api.github.com/users/CincyPy/events{/privacy}","received_events_url":"https://api.github.com/users/CincyPy/received_events","type":"Organization","site_admin":false},"repo":{"id":40940758,"name":"LibraryWebsite","full_name":"CincyPy/LibraryWebsite","owner":{"login":"CincyPy","id":12663130,"avatar_url":"https://avatars.githubusercontent.com/u/12663130?v=3","gravatar_id":"","url":"https://api.github.com/users/CincyPy","html_url":"https://github.com/CincyPy","followers_url":"https://api.github.com/users/CincyPy/followers","following_url":"https://api.github.com/users/CincyPy/following{/other_user}","gists_url":"https://api.github.com/users/CincyPy/gists{/gist_id}","starred_url":"https://api.github.com/users/CincyPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CincyPy/subscriptions","organizations_url":"https://api.github.com/users/CincyPy/orgs","repos_url":"https://api.github.com/users/CincyPy/repos","events_url":"https://api.github.com/users/CincyPy/events{/privacy}","received_events_url":"https://api.github.com/users/CincyPy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CincyPy/LibraryWebsite","description":"This is the repository for the Library Website project","fork":false,"url":"https://api.github.com/repos/CincyPy/LibraryWebsite","forks_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/forks","keys_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/teams","hooks_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/hooks","issue_events_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/events{/number}","events_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/events","assignees_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/assignees{/user}","branches_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/branches{/branch}","tags_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/tags","blobs_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/refs{/sha}","trees_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/statuses/{sha}","languages_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/languages","stargazers_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/stargazers","contributors_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/contributors","subscribers_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/subscribers","subscription_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/subscription","commits_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/commits{/sha}","git_commits_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/commits{/sha}","comments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/comments{/number}","issue_comment_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/comments{/number}","contents_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/contents/{+path}","compare_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/merges","archive_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/downloads","issues_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues{/number}","pulls_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls{/number}","milestones_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/milestones{/number}","notifications_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/labels{/name}","releases_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/releases{/id}","deployments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/deployments","created_at":"2015-08-18T00:43:59Z","updated_at":"2016-03-22T13:08:05Z","pushed_at":"2016-05-02T20:21:44Z","git_url":"git://github.com/CincyPy/LibraryWebsite.git","ssh_url":"git@github.com:CincyPy/LibraryWebsite.git","clone_url":"https://github.com/CincyPy/LibraryWebsite.git","svn_url":"https://github.com/CincyPy/LibraryWebsite","homepage":null,"size":9152,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"CincyPy:master","ref":"master","sha":"7d7abff30f46ff4cefc797f05bdc441b4a7e5c50","user":{"login":"CincyPy","id":12663130,"avatar_url":"https://avatars.githubusercontent.com/u/12663130?v=3","gravatar_id":"","url":"https://api.github.com/users/CincyPy","html_url":"https://github.com/CincyPy","followers_url":"https://api.github.com/users/CincyPy/followers","following_url":"https://api.github.com/users/CincyPy/following{/other_user}","gists_url":"https://api.github.com/users/CincyPy/gists{/gist_id}","starred_url":"https://api.github.com/users/CincyPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CincyPy/subscriptions","organizations_url":"https://api.github.com/users/CincyPy/orgs","repos_url":"https://api.github.com/users/CincyPy/repos","events_url":"https://api.github.com/users/CincyPy/events{/privacy}","received_events_url":"https://api.github.com/users/CincyPy/received_events","type":"Organization","site_admin":false},"repo":{"id":40940758,"name":"LibraryWebsite","full_name":"CincyPy/LibraryWebsite","owner":{"login":"CincyPy","id":12663130,"avatar_url":"https://avatars.githubusercontent.com/u/12663130?v=3","gravatar_id":"","url":"https://api.github.com/users/CincyPy","html_url":"https://github.com/CincyPy","followers_url":"https://api.github.com/users/CincyPy/followers","following_url":"https://api.github.com/users/CincyPy/following{/other_user}","gists_url":"https://api.github.com/users/CincyPy/gists{/gist_id}","starred_url":"https://api.github.com/users/CincyPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CincyPy/subscriptions","organizations_url":"https://api.github.com/users/CincyPy/orgs","repos_url":"https://api.github.com/users/CincyPy/repos","events_url":"https://api.github.com/users/CincyPy/events{/privacy}","received_events_url":"https://api.github.com/users/CincyPy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CincyPy/LibraryWebsite","description":"This is the repository for the Library Website project","fork":false,"url":"https://api.github.com/repos/CincyPy/LibraryWebsite","forks_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/forks","keys_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/teams","hooks_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/hooks","issue_events_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/events{/number}","events_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/events","assignees_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/assignees{/user}","branches_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/branches{/branch}","tags_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/tags","blobs_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/refs{/sha}","trees_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/statuses/{sha}","languages_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/languages","stargazers_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/stargazers","contributors_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/contributors","subscribers_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/subscribers","subscription_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/subscription","commits_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/commits{/sha}","git_commits_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/git/commits{/sha}","comments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/comments{/number}","issue_comment_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/comments{/number}","contents_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/contents/{+path}","compare_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/merges","archive_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/downloads","issues_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues{/number}","pulls_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls{/number}","milestones_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/milestones{/number}","notifications_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/labels{/name}","releases_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/releases{/id}","deployments_url":"https://api.github.com/repos/CincyPy/LibraryWebsite/deployments","created_at":"2015-08-18T00:43:59Z","updated_at":"2016-03-22T13:08:05Z","pushed_at":"2016-05-02T20:21:44Z","git_url":"git://github.com/CincyPy/LibraryWebsite.git","ssh_url":"git@github.com:CincyPy/LibraryWebsite.git","clone_url":"https://github.com/CincyPy/LibraryWebsite.git","svn_url":"https://github.com/CincyPy/LibraryWebsite","homepage":null,"size":9152,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59"},"html":{"href":"https://github.com/CincyPy/LibraryWebsite/pull/59"},"issue":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/59"},"comments":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/CincyPy/LibraryWebsite/statuses/fb1b08aa7b3c8e1f7d2dd5b05bbc84afcdf4aa51"}}}}