"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mrbs-1.9.4/web/lib/MRBS/Auth/AuthImap.php" between
mrbs-1.9.4.tar.gz and mrbs-1.10.0.tar.gz

About: MRBS is a web application for booking meeting rooms or other resources (using PHP and MySQL/pgsql).

AuthImap.php  (mrbs-1.9.4):AuthImap.php  (mrbs-1.10.0)
skipping to change at line 22 skipping to change at line 22
* $auth["type"] = "imap"; * $auth["type"] = "imap";
* *
* Then, you may configure admin users: * Then, you may configure admin users:
* *
* $auth["admin"][] = "imapuser1"; * $auth["admin"][] = "imapuser1";
* $auth["admin"][] = "imapuser2"; * $auth["admin"][] = "imapuser2";
*/ */
class AuthImap extends Auth class AuthImap extends Auth
{ {
/* authValidateUser($user, $pass) /* validateUser($user, $pass)
* *
* Checks if the specified username/password pair are valid * Checks if the specified username/password pair are valid
* *
* $user - The user name * $user - The user name
* $pass - The password * $pass - The password
* *
* Returns: * Returns:
* false - The pair are invalid or do not exist * false - The pair are invalid or do not exist
* string - The validated username * string - The validated username
*/ */
public function validateUser($user, $pass) public function validateUser(?string $user, ?string $pass)
{ {
global $imap_host, $imap_port; global $imap_host, $imap_port;
$all_imap_hosts = array(); $all_imap_hosts = array();
$all_imap_ports = array(); $all_imap_ports = array();
// Check if we do not have a username/password // Check if we do not have a username/password
if (!isset($user) || !isset($pass) || strlen($pass)==0) if (!isset($user) || !isset($pass) || strlen($pass)==0)
{ {
return false; return false;
skipping to change at line 113 skipping to change at line 113
fputs( $stream, "a002 LOGOUT\r\n" ); fputs( $stream, "a002 LOGOUT\r\n" );
fclose( $stream ); fclose( $stream );
} }
} }
// return failure // return failure
return false; return false;
} }
// Checks whether validation of a user by email address is possible and allowe d. // Checks whether validation of a user by email address is possible and allowe d.
public function canValidateByEmail() public function canValidateByEmail() : bool
{ {
return true; return true;
} }
/* quote_imap($str) /* quote_imap($str)
* *
* quote char's into valid IMAP string * quote char's into valid IMAP string
* *
* $str - String to be quoted * $str - String to be quoted
* *
* Returns: * Returns:
* quoted string * quoted string
*/ */
private static function quote_imap($str) private static function quote_imap(string $str) : string
{ {
return preg_replace('/(["\\\\])/', '\\$1', $str); return preg_replace('/(["\\\\])/', '\\$1', $str);
} }
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)