Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
36 | protected function doTest() |
||
37 | { |
||
38 | $this->setMessage('Check that the file owner matches the user executing php'); |
||
39 | |||
40 | $request = Request::createFromGlobals(); |
||
41 | |||
42 | $owning = fileowner($request->server->get('SCRIPT_FILENAME')); |
||
43 | $running = getmyuid(); |
||
44 | |||
45 | if ($owning === $running) { |
||
46 | $this->markSuccess(); |
||
47 | |||
48 | return; |
||
49 | } |
||
50 | |||
51 | $this->markWarning('Script is owned by uid ' . $owning . ' whereas it is being executed by uid ' . $running); |
||
52 | } |
||
53 | } |
||
54 |