XOOPS Docs - XOOPS
[ class tree: XOOPS ] [ index: XOOPS ] [ all elements ]

Class: XoopsSecurity

Source Location: /class/xoopssecurity.php

Class Overview




Variables

Methods



Class Details

[line 41]


[ Top ]


Class Variables

$errors = array()

[line 42]


Type:   mixed


[ Top ]



Class Methods


constructor XoopsSecurity [line 47]

XoopsSecurity XoopsSecurity( )

Constructor



[ Top ]

method check [line 58]

bool check( [bool $clearIfValid = true], [string $token = false])

Check if there is a valid token in $_REQUEST['XOOPS_TOKEN_REQUEST'] - can be expanded for more wide use, later (Mith)



Parameters:

bool   $clearIfValid   whether to clear the token after validation
string   $token   token to validate

[ Top ]

method checkBadips [line 199]

void checkBadips( )

Check if visitor's IP address is banned Should be changed to return bool and let the action be up to the calling script



[ Top ]

method checkReferer [line 164]

bool checkReferer( [int $docheck = 1])

Check the user agent's HTTP REFERER against XOOPS_URL



Parameters:

int   $docheck   0 to not check the referer (used with XML-RPC), 1 to actively check it

[ Top ]

method checkSuperglobals [line 184]

void checkSuperglobals( )

Check superglobals for contamination



[ Top ]

method clearTokens [line 130]

void clearTokens( )

Clear all token values from user's session



[ Top ]

method createToken [line 69]

string createToken( [int $timeout = 0])

Create a token in the user's session



Tags:

return:  token value


Parameters:

int   $timeout   time in seconds the token should be valid

[ Top ]

method filterToken [line 142]

bool filterToken( string $token)

Check whether a token value is expired or not



Parameters:

string   $token  

[ Top ]

method garbageCollection [line 152]

void garbageCollection( )

Perform garbage collection, clearing expired tokens



[ Top ]

method getErrors [line 241]

array|string &getErrors( [bool $ashtml = false])

Get generated errors



Tags:

return:  Array of array messages OR HTML string


Parameters:

bool   $ashtml   Format using HTML?

[ Top ]

method getTokenHTML [line 218]

string getTokenHTML( )

Get the HTML code for a XoopsFormHiddenToken object - used in forms that do not use XoopsForm elements



[ Top ]

method setErrors [line 229]

void setErrors( string $error)

Add an error



Parameters:

string   $error  

[ Top ]

method validateToken [line 93]

bool validateToken( [string $token = false], [bool $clearIfValid = true])

Check if a token is valid. If no token is specified, $_REQUEST['XOOPS_TOKEN_REQUEST'] is checked



Parameters:

string   $token   token to validate
bool   $clearIfValid   whether to clear the token value if valid

[ Top ]


XOOPS Docs generated by phpDocumentor