File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function password() {
101101 $ this ->view = new \helpers \View ();
102102 $ this ->view ->password = true ;
103103 if (isset ($ _POST ['password ' ]))
104- $ this ->view ->hash = password_hash ( $ _POST ['password ' ], PASSWORD_DEFAULT );
104+ $ this ->view ->hash = hash ( " sha512 " , \ F3 :: get ( ' salt ' ) . $ _POST ['password ' ]);
105105 echo $ this ->view ->render ('templates/login.phtml ' );
106106 }
107107
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ items_lifetime=30
1515base_url =
1616username =
1717password =
18+ salt =lkjl1289
1819public =
1920html_title =selfoss
2021rss_title =selfoss feed
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public function loginWithoutUser() {
9898 public function login ($ username , $ password ) {
9999 if ($ this ->enabled ()) {
100100 if (
101- $ username == \F3 ::get ('username ' ) && password_verify ( $ password, \F3 ::get ('password ' ) )
101+ $ username == \F3 ::get ('username ' ) && hash ( " sha512 " , \ F3 :: get ( ' salt ' ) . $ password) == \F3 ::get ('password ' )
102102 ) {
103103 $ this ->loggedin = true ;
104104 $ _SESSION ['loggedin ' ] = true ;
You can’t perform that action at this time.
0 commit comments