lib

# Procedural File: security.inc

Source Location: /lib/security.inc

## Page Details:

This file includes functions to perform several security checks on each page load.

#### Tags:

author: | Roland Gruber

#### Includes:

include_once('config.inc') [line 32]
configuration options
include_once('ldap.inc') [line 34]
ldap connection

### checkClientIP [line 79]

`void checkClientIP( )`

Checks if the client's IP address is on the list of allowed IPs.

The script is stopped if the host is not valid.

[ Top ]

### checkIfPasswordChangeIsAllowed [line 209]

`boolean checkIfPasswordChangeIsAllowed( )`

Checks if passwords may be changed.

#### Tags:

return: | true, if allowed

[ Top ]

### checkIfWriteAccessIsAllowed [line 194]

`boolean checkIfWriteAccessIsAllowed( )`

Checks if write access to LDAP is allowed.

#### Tags:

return: | true, if allowed

[ Top ]

### checkPasswordStrength [line 225]

`mixed checkPasswordStrength( string $password)`

Checks if the password fulfills the password policies.

#### Tags:

return: | true if ok, string with error message if not valid

#### Parameters

string | $password | password

[ Top ]

### logNewMessage [line 157]

`void logNewMessage( string $level, string $message)`

Puts a new message in the log file.

#### Parameters

string | $level | log level (LOG_NOTICE, LOG_WARNING, LOG_ERR)
string | $message | log message

[ Top ]

### logoffAndBackToLoginPage [line 110]

`void logoffAndBackToLoginPage( )`

Logs off the user and displays the login page.
[ Top ]

### startSecureSession [line 43]

`void startSecureSession( )`

Starts a session and checks the environment.

The script is stopped if one of the checks fail.

[ Top ]

Documentation generated on Wed, 05 Aug 2009 19:53:08 +0200 by phpDocumentor 1.4.1