{"action":"created","comment":{"url":"https://api.github.com/repos/pkp/ojs/pulls/comments/38379830","id":38379830,"diff_hunk":"@@ -0,0 +1,18 @@\n+<?php\n+\n+/**\n+ * @see https://github.com/ircmaxell/password_compat\n+ */\n+\n+// password_compat uses namespaces, so ensure PHP version supports this\n+if (version_compare(phpversion(), '5.3.0', '>=')) {\n+\trequire_once(BASE_SYS_DIR . '/lib/password_compat/lib/password.php');\n+}    \n+\n+// set a flag to indicate whether modern encryption is supported\n+define('LEGACY_ENCRYPTION', !(","path":"classes/security/password.inc.php","position":null,"original_position":13,"commit_id":"956105b1493f0c669f45110b54456763d599dde4","original_commit_id":"b66308e638a2683fdf8e76f00e512bafc65e329f","user":{"login":"UTSLibraryITS","id":13878841,"avatar_url":"https://avatars.githubusercontent.com/u/13878841?v=3","gravatar_id":"","url":"https://api.github.com/users/UTSLibraryITS","html_url":"https://github.com/UTSLibraryITS","followers_url":"https://api.github.com/users/UTSLibraryITS/followers","following_url":"https://api.github.com/users/UTSLibraryITS/following{/other_user}","gists_url":"https://api.github.com/users/UTSLibraryITS/gists{/gist_id}","starred_url":"https://api.github.com/users/UTSLibraryITS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UTSLibraryITS/subscriptions","organizations_url":"https://api.github.com/users/UTSLibraryITS/orgs","repos_url":"https://api.github.com/users/UTSLibraryITS/repos","events_url":"https://api.github.com/users/UTSLibraryITS/events{/privacy}","received_events_url":"https://api.github.com/users/UTSLibraryITS/received_events","type":"User","site_admin":false},"body":"Moved the password library stuff into it's own class.","created_at":"2015-09-01T02:06:22Z","updated_at":"2015-09-01T02:06:22Z","html_url":"https://github.com/pkp/ojs/pull/584#discussion_r38379830","pull_request_url":"https://api.github.com/repos/pkp/ojs/pulls/584","_links":{"self":{"href":"https://api.github.com/repos/pkp/ojs/pulls/comments/38379830"},"html":{"href":"https://github.com/pkp/ojs/pull/584#discussion_r38379830"},"pull_request":{"href":"https://api.github.com/repos/pkp/ojs/pulls/584"}}},"pull_request":{"url":"https://api.github.com/repos/pkp/ojs/pulls/584","id":43737829,"html_url":"https://github.com/pkp/ojs/pull/584","diff_url":"https://github.com/pkp/ojs/pull/584.diff","patch_url":"https://github.com/pkp/ojs/pull/584.patch","issue_url":"https://api.github.com/repos/pkp/ojs/issues/584","number":584,"state":"open","locked":false,"title":"Implemented improved password hashing to resolve pkp/pkp-lib#695","user":{"login":"UTSLibraryITS","id":13878841,"avatar_url":"https://avatars.githubusercontent.com/u/13878841?v=3","gravatar_id":"","url":"https://api.github.com/users/UTSLibraryITS","html_url":"https://github.com/UTSLibraryITS","followers_url":"https://api.github.com/users/UTSLibraryITS/followers","following_url":"https://api.github.com/users/UTSLibraryITS/following{/other_user}","gists_url":"https://api.github.com/users/UTSLibraryITS/gists{/gist_id}","starred_url":"https://api.github.com/users/UTSLibraryITS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UTSLibraryITS/subscriptions","organizations_url":"https://api.github.com/users/UTSLibraryITS/orgs","repos_url":"https://api.github.com/users/UTSLibraryITS/repos","events_url":"https://api.github.com/users/UTSLibraryITS/events{/privacy}","received_events_url":"https://api.github.com/users/UTSLibraryITS/received_events","type":"User","site_admin":false},"body":"fixes pkp/pkp-lib#695\r\n\r\nWe have implemented [password_compat](https://github.com/ircmaxell/password_compat) library for improved OJS password hashing.\r\n\r\nAlthough PHP 5.3 is required for password_compat, all changes are fully backwards compatible. If the version of PHP is supported, the more secure bcrypt encryption will automatically be used.\r\n\r\nPassword reset hashes have also been improved with better hashing (and HMAC where available) and the addition of a unique salt (configurable via the config file). Reset hashes also have a basic expiration component, based off the user's last login time.\r\n\r\nAll existing \\ legacy password hashes will continue to work. They will be seamlessly updated to new bcrypt-based hashes the next time the user logs in.\r\n\r\nPlease let us know if there is any issues or comments.","created_at":"2015-08-31T07:17:05Z","updated_at":"2015-09-01T02:06:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8e70cdd6a5467da1c5bd4b37226bedd67bd7760","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pkp/ojs/pulls/584/commits","review_comments_url":"https://api.github.com/repos/pkp/ojs/pulls/584/comments","review_comment_url":"https://api.github.com/repos/pkp/ojs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pkp/ojs/issues/584/comments","statuses_url":"https://api.github.com/repos/pkp/ojs/statuses/956105b1493f0c669f45110b54456763d599dde4","head":{"label":"utslibrary:password-fix","ref":"password-fix","sha":"956105b1493f0c669f45110b54456763d599dde4","user":{"login":"utslibrary","id":5022569,"avatar_url":"https://avatars.githubusercontent.com/u/5022569?v=3","gravatar_id":"","url":"https://api.github.com/users/utslibrary","html_url":"https://github.com/utslibrary","followers_url":"https://api.github.com/users/utslibrary/followers","following_url":"https://api.github.com/users/utslibrary/following{/other_user}","gists_url":"https://api.github.com/users/utslibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/utslibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utslibrary/subscriptions","organizations_url":"https://api.github.com/users/utslibrary/orgs","repos_url":"https://api.github.com/users/utslibrary/repos","events_url":"https://api.github.com/users/utslibrary/events{/privacy}","received_events_url":"https://api.github.com/users/utslibrary/received_events","type":"Organization","site_admin":false},"repo":{"id":41660074,"name":"ojs","full_name":"utslibrary/ojs","owner":{"login":"utslibrary","id":5022569,"avatar_url":"https://avatars.githubusercontent.com/u/5022569?v=3","gravatar_id":"","url":"https://api.github.com/users/utslibrary","html_url":"https://github.com/utslibrary","followers_url":"https://api.github.com/users/utslibrary/followers","following_url":"https://api.github.com/users/utslibrary/following{/other_user}","gists_url":"https://api.github.com/users/utslibrary/gists{/gist_id}","starred_url":"https://api.github.com/users/utslibrary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utslibrary/subscriptions","organizations_url":"https://api.github.com/users/utslibrary/orgs","repos_url":"https://api.github.com/users/utslibrary/repos","events_url":"https://api.github.com/users/utslibrary/events{/privacy}","received_events_url":"https://api.github.com/users/utslibrary/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/utslibrary/ojs","description":"Open Journal Systems","fork":true,"url":"https://api.github.com/repos/utslibrary/ojs","forks_url":"https://api.github.com/repos/utslibrary/ojs/forks","keys_url":"https://api.github.com/repos/utslibrary/ojs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/utslibrary/ojs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/utslibrary/ojs/teams","hooks_url":"https://api.github.com/repos/utslibrary/ojs/hooks","issue_events_url":"https://api.github.com/repos/utslibrary/ojs/issues/events{/number}","events_url":"https://api.github.com/repos/utslibrary/ojs/events","assignees_url":"https://api.github.com/repos/utslibrary/ojs/assignees{/user}","branches_url":"https://api.github.com/repos/utslibrary/ojs/branches{/branch}","tags_url":"https://api.github.com/repos/utslibrary/ojs/tags","blobs_url":"https://api.github.com/repos/utslibrary/ojs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/utslibrary/ojs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/utslibrary/ojs/git/refs{/sha}","trees_url":"https://api.github.com/repos/utslibrary/ojs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/utslibrary/ojs/statuses/{sha}","languages_url":"https://api.github.com/repos/utslibrary/ojs/languages","stargazers_url":"https://api.github.com/repos/utslibrary/ojs/stargazers","contributors_url":"https://api.github.com/repos/utslibrary/ojs/contributors","subscribers_url":"https://api.github.com/repos/utslibrary/ojs/subscribers","subscription_url":"https://api.github.com/repos/utslibrary/ojs/subscription","commits_url":"https://api.github.com/repos/utslibrary/ojs/commits{/sha}","git_commits_url":"https://api.github.com/repos/utslibrary/ojs/git/commits{/sha}","comments_url":"https://api.github.com/repos/utslibrary/ojs/comments{/number}","issue_comment_url":"https://api.github.com/repos/utslibrary/ojs/issues/comments{/number}","contents_url":"https://api.github.com/repos/utslibrary/ojs/contents/{+path}","compare_url":"https://api.github.com/repos/utslibrary/ojs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/utslibrary/ojs/merges","archive_url":"https://api.github.com/repos/utslibrary/ojs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/utslibrary/ojs/downloads","issues_url":"https://api.github.com/repos/utslibrary/ojs/issues{/number}","pulls_url":"https://api.github.com/repos/utslibrary/ojs/pulls{/number}","milestones_url":"https://api.github.com/repos/utslibrary/ojs/milestones{/number}","notifications_url":"https://api.github.com/repos/utslibrary/ojs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/utslibrary/ojs/labels{/name}","releases_url":"https://api.github.com/repos/utslibrary/ojs/releases{/id}","created_at":"2015-08-31T06:43:13Z","updated_at":"2015-08-31T06:43:19Z","pushed_at":"2015-09-01T02:05:41Z","git_url":"git://github.com/utslibrary/ojs.git","ssh_url":"git@github.com:utslibrary/ojs.git","clone_url":"https://github.com/utslibrary/ojs.git","svn_url":"https://github.com/utslibrary/ojs","homepage":"http://pkp.sfu.ca/ojs","size":144433,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pkp:ojs-stable-2_4_6","ref":"ojs-stable-2_4_6","sha":"483a13e2e54d6e5a92053100ac10037162293bcc","user":{"login":"pkp","id":130896,"avatar_url":"https://avatars.githubusercontent.com/u/130896?v=3","gravatar_id":"","url":"https://api.github.com/users/pkp","html_url":"https://github.com/pkp","followers_url":"https://api.github.com/users/pkp/followers","following_url":"https://api.github.com/users/pkp/following{/other_user}","gists_url":"https://api.github.com/users/pkp/gists{/gist_id}","starred_url":"https://api.github.com/users/pkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkp/subscriptions","organizations_url":"https://api.github.com/users/pkp/orgs","repos_url":"https://api.github.com/users/pkp/repos","events_url":"https://api.github.com/users/pkp/events{/privacy}","received_events_url":"https://api.github.com/users/pkp/received_events","type":"Organization","site_admin":false},"repo":{"id":375152,"name":"ojs","full_name":"pkp/ojs","owner":{"login":"pkp","id":130896,"avatar_url":"https://avatars.githubusercontent.com/u/130896?v=3","gravatar_id":"","url":"https://api.github.com/users/pkp","html_url":"https://github.com/pkp","followers_url":"https://api.github.com/users/pkp/followers","following_url":"https://api.github.com/users/pkp/following{/other_user}","gists_url":"https://api.github.com/users/pkp/gists{/gist_id}","starred_url":"https://api.github.com/users/pkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkp/subscriptions","organizations_url":"https://api.github.com/users/pkp/orgs","repos_url":"https://api.github.com/users/pkp/repos","events_url":"https://api.github.com/users/pkp/events{/privacy}","received_events_url":"https://api.github.com/users/pkp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pkp/ojs","description":"Open Journal Systems","fork":false,"url":"https://api.github.com/repos/pkp/ojs","forks_url":"https://api.github.com/repos/pkp/ojs/forks","keys_url":"https://api.github.com/repos/pkp/ojs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkp/ojs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkp/ojs/teams","hooks_url":"https://api.github.com/repos/pkp/ojs/hooks","issue_events_url":"https://api.github.com/repos/pkp/ojs/issues/events{/number}","events_url":"https://api.github.com/repos/pkp/ojs/events","assignees_url":"https://api.github.com/repos/pkp/ojs/assignees{/user}","branches_url":"https://api.github.com/repos/pkp/ojs/branches{/branch}","tags_url":"https://api.github.com/repos/pkp/ojs/tags","blobs_url":"https://api.github.com/repos/pkp/ojs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkp/ojs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkp/ojs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkp/ojs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkp/ojs/statuses/{sha}","languages_url":"https://api.github.com/repos/pkp/ojs/languages","stargazers_url":"https://api.github.com/repos/pkp/ojs/stargazers","contributors_url":"https://api.github.com/repos/pkp/ojs/contributors","subscribers_url":"https://api.github.com/repos/pkp/ojs/subscribers","subscription_url":"https://api.github.com/repos/pkp/ojs/subscription","commits_url":"https://api.github.com/repos/pkp/ojs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkp/ojs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkp/ojs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkp/ojs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkp/ojs/contents/{+path}","compare_url":"https://api.github.com/repos/pkp/ojs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkp/ojs/merges","archive_url":"https://api.github.com/repos/pkp/ojs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkp/ojs/downloads","issues_url":"https://api.github.com/repos/pkp/ojs/issues{/number}","pulls_url":"https://api.github.com/repos/pkp/ojs/pulls{/number}","milestones_url":"https://api.github.com/repos/pkp/ojs/milestones{/number}","notifications_url":"https://api.github.com/repos/pkp/ojs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkp/ojs/labels{/name}","releases_url":"https://api.github.com/repos/pkp/ojs/releases{/id}","created_at":"2009-11-16T21:19:14Z","updated_at":"2015-08-28T17:23:42Z","pushed_at":"2015-09-01T02:05:42Z","git_url":"git://github.com/pkp/ojs.git","ssh_url":"git@github.com:pkp/ojs.git","clone_url":"https://github.com/pkp/ojs.git","svn_url":"https://github.com/pkp/ojs","homepage":"http://pkp.sfu.ca/ojs","size":144433,"stargazers_count":218,"watchers_count":218,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":22,"forks":225,"open_issues":22,"watchers":218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pkp/ojs/pulls/584"},"html":{"href":"https://github.com/pkp/ojs/pull/584"},"issue":{"href":"https://api.github.com/repos/pkp/ojs/issues/584"},"comments":{"href":"https://api.github.com/repos/pkp/ojs/issues/584/comments"},"review_comments":{"href":"https://api.github.com/repos/pkp/ojs/pulls/584/comments"},"review_comment":{"href":"https://api.github.com/repos/pkp/ojs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pkp/ojs/pulls/584/commits"},"statuses":{"href":"https://api.github.com/repos/pkp/ojs/statuses/956105b1493f0c669f45110b54456763d599dde4"}}}}