File tree 7 files changed +8
-7
lines changed
7 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 84
84
// verify code set to user's data_2fa field
85
85
$ sel_stmt = Database::prepare ("SELECT `data_2fa` FROM " . $ table . " WHERE ` " . $ field . "` = :uid " );
86
86
$ userinfo_code = Database::pexecute_first ($ sel_stmt , ['uid ' => $ uid ]);
87
- $ result = $ tfa ->verifyCode ($ userinfo_code ['data_2fa ' ], $ code );
87
+ // 60sec discrepancy (possible slow email delivery)
88
+ $ result = $ tfa ->verifyCode ($ userinfo_code ['data_2fa ' ], $ code , 60 );
88
89
} else {
89
90
$ result = $ tfa ->verifyCode ($ _SESSION ['secret_2fa ' ], $ code , 3 );
90
91
}
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function deleteDatabase(string $dbname)
187
187
*/
188
188
public function deleteUser (string $ username , string $ host )
189
189
{
190
- if (Database::getAttribute (PDO ::ATTR_SERVER_VERSION ) < '5.0.2 ' ) {
190
+ if (version_compare ( Database::getAttribute (PDO ::ATTR_SERVER_VERSION ), '5.0.2 ' , ' < ' ) ) {
191
191
// Revoke privileges (only required for MySQL 4.1.2 - 5.0.1)
192
192
$ stmt = Database::prepare ("REVOKE ALL PRIVILEGES ON * . * FROM ` " . $ username . "`@` " . $ host . "` " );
193
193
Database::pexecute ($ stmt );
Original file line number Diff line number Diff line change 3174
3174
</content >
3175
3175
</file >
3176
3176
<file name =" /etc/pure-ftpd/db/mysql.conf" chown =" root:0"
3177
- chmod=" 0644 " backup =" true" >
3177
+ chmod=" 0640 " backup =" true" >
3178
3178
<content ><![CDATA[
3179
3179
##############################################
3180
3180
# #
Original file line number Diff line number Diff line change 4742
4742
</content >
4743
4743
</file >
4744
4744
<file name =" /etc/pure-ftpd/db/mysql.conf" chown =" root:0"
4745
- chmod=" 0644 " backup =" true" >
4745
+ chmod=" 0640 " backup =" true" >
4746
4746
<content ><![CDATA[
4747
4747
##############################################
4748
4748
# #
Original file line number Diff line number Diff line change 3961
3961
</content >
3962
3962
</file >
3963
3963
<file name =" /etc/pure-ftpd/db/mysql.conf" chown =" root:0"
3964
- chmod=" 0644 " backup =" true" >
3964
+ chmod=" 0640 " backup =" true" >
3965
3965
<content ><![CDATA[
3966
3966
##############################################
3967
3967
# #
Original file line number Diff line number Diff line change 3953
3953
</content >
3954
3954
</file >
3955
3955
<file name =" /etc/pure-ftpd/db/mysql.conf" chown =" root:0"
3956
- chmod=" 0644 " backup =" true" >
3956
+ chmod=" 0640 " backup =" true" >
3957
3957
<content ><![CDATA[
3958
3958
##############################################
3959
3959
# #
Original file line number Diff line number Diff line change 2628
2628
</content >
2629
2629
</file >
2630
2630
<file name =" /etc/pure-ftpd/db/mysql.conf" chown =" root:0"
2631
- chmod=" 0644 " backup =" true" >
2631
+ chmod=" 0640 " backup =" true" >
2632
2632
<content ><![CDATA[
2633
2633
##############################################
2634
2634
# #
You can’t perform that action at this time.
0 commit comments