Project

General

Profile

« Previous | Next » 

Revision 1690

Added by darkviper about 12 years ago

ModLanguage modified for auto fallback to DEFAULT_LANGUAGE
globalExceptionHandler added AppException, SecurityException, SecDirectoryTraversalException
Errormessage for old class.database modified

View differences:

globalExceptionHandler.php
32 32
				if(mysql_errno()) {
33 33
					$result .= mysql_errno().': '.mysql_error().'<br />'."\n";
34 34
				}
35
				$result .= '<pre>'."\n";
36
				$result .= print_r($trace, true)."\n";
37
				$result .= '</pre>'."\n";
35 38
			}else {
36 39
				$result = 'Exception: "'.$this->getMessage().'" in ['.$file.']<br />'."\n";
37 40
			}
......
56 59

  
57 60
	class SecDirectoryTraversalException extends SecurityException {
58 61
		public function __toString() {
59
			return 'possible directory traversal attack';
62
			$out  = 'possible directory traversal attack<br />'."\n";
63
			$out .= '\''.$e->getMessage().'\'<br />'."\n";
64
			return $out;
60 65
		}
61 66
	}
62 67
/* ------------------------------------------------------------------------------------ */
......
77 82
			$out .= $trace[0]['function'].'();<br />';
78 83
			$out .= 'in "'.$file.'"'."\n";
79 84
			echo $out;
85
		}elseif ($e instanceof AppException) {
86
			echo (string)$e;
80 87
		}elseif ($e instanceof IllegalFileException) {
81 88
			$sResponse  = $_SERVER['SERVER_PROTOCOL'].' 403 Forbidden';
82 89
			header($sResponse);

Also available in: Unified diff