File tree Expand file tree Collapse file tree 4 files changed +21
-9
lines changed
Expand file tree Collapse file tree 4 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 1+ ## 3.0.4 - 2021-07-09 [ CRITICAL]
2+ ### Fixed
3+ - Fix security vulnerability
4+
15## 3.0.3 - 2019-11-25
26### Fixed
37- Fix error when first file is not ` *.log ` (via [ @sebschaefer ] ( https://github.com/sebschaefer ) )
Original file line number Diff line number Diff line change 11{
22 "name" : " ether/logs" ,
33 "description" : " Access logs from the CP" ,
4- "version" : " 3.0.3 " ,
4+ "version" : " 3.0.4 " ,
55 "type" : " craft-plugin" ,
66 "minimum-stability" : " dev" ,
77 "require" : {
Original file line number Diff line number Diff line change 22
33namespace ether \logs ;
44
5+ use Craft ;
6+
57class Controller extends \craft \web \Controller
68{
79
810 public function actionStream ()
911 {
10- $ logsDir = \Craft::getAlias ('@storage/logs ' );
11- $ logFile = \Craft::$ app ->request ->getParam ('log ' );
12- $ currentLog = \Craft::$ app ->request ->get ('log ' , $ logFile );
12+ $ logsDir = Craft::getAlias ('@storage/logs ' );
13+ $ logFile = Craft::$ app ->request ->getParam ('log ' );
14+ $ currentLog = basename (Craft::$ app ->request ->get ('log ' , $ logFile ));
15+
16+ if (strpos ($ currentLog , '.log ' ) === false )
17+ return '<p>You can only access <code>.log</code> files!</p> ' ;
18+
1319 $ log = file_get_contents ($ logsDir . '/ ' . $ currentLog );
1420
1521 exit ($ log );
Original file line number Diff line number Diff line change 11<form >
2- <select id =" __logSwitch" >
3- {% for file in logFiles %}
4- <option {{ file == currentLog ? ' selected' }}>{{ file }}</option >
5- {% endfor %}
6- </select >
2+ <label class =" select" >
3+ <select id =" __logSwitch" >
4+ {% for file in logFiles %}
5+ <option {{ file == currentLog ? ' selected' }}>{{ file }}</option >
6+ {% endfor %}
7+ </select >
8+ </label >
79</form >
810
911<hr style =" margin-bottom:0" >
You can’t perform that action at this time.
0 commit comments