Browse Source

security workaround

Paweł Bukowski 12 years ago
parent
commit
1f58e2fac0
3 changed files with 5 additions and 1 deletions
  1. 0
    0
      backup/index.html
  2. 0
    0
      data/index.html
  3. 5
    1
      modules/Base/Error/ErrorCommon_0.php

+ 0
- 0
backup/index.html View File


+ 0
- 0
data/index.html View File


+ 5
- 1
modules/Base/Error/ErrorCommon_0.php View File

@@ -18,7 +18,11 @@ class EpesiErrorObserver extends ErrorObserver {
18 18
 				debug_print_backtrace();
19 19
 				$backtrace = "\nerror backtrace:\n".ob_get_contents();
20 20
 			} else $backtrace = '';
21
-			Base_MailCommon::send('bugs@telaxus.com','Epesi Error',"who=".Acl::get_user()."\ntype=".$type."\nmessage=".$message."\nerror file=".$errfile."\nerror line=".$errline."\n".$backtrace);
21
+			$x = "who=".Acl::get_user()."\ntype=".$type."\nmessage=".$message."\nerror file=".$errfile."\nerror line=".$errline."\n".$backtrace;
22
+			$d = $this->get_data_dir().md5($x).'.txt';
23
+			file_put_contents($d,$x);
24
+			$url = 'http'.(isset($_SERVER['HTTPS'])?'s':'').'://'. $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
25
+			Base_MailCommon::send('pbukowski@telaxus.com','Epesi Error',$url.'/'.$d);
22 26
 		}
23 27
 		return true;
24 28
 	}

Loading…
Cancel
Save