File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
library/SecurityMultiTool Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function isValid($token, $tokenName = null)
6363 try {
6464 $ array = $ this ->retrieveTokenFromSession ($ tokenName );
6565 } catch (Exception \RuntimeException $ e ) {
66- return false ;
66+ return false ; //TODO: Set lastException for debug recall
6767 }
6868 if (empty ($ array ) || !is_array ($ array ) || !isset ($ array ['token ' ])
6969 || !isset ($ array ['expire ' ])) {
Original file line number Diff line number Diff line change 33namespace SecurityMultiTool \Http ;
44
55use SecurityMultiTool \Http \Header ;
6+ use SecurityMultiTool \Common ;
7+ use SecurityMultiTool \Exception ;
68
7- class Headers implements \Countable
9+ class Headers implements \Countable, Common \OptionsInterface
810{
911
1012 protected $ options = array ();
Original file line number Diff line number Diff line change 77use SecurityMultiTool \Exception ;
88use SecurityMultiTool \Common ;
99
10- class Parser extends Common \AbstractOptions implements Common \OptionsInterface
10+ class Parser implements Common \OptionsInterface
1111{
1212
1313 protected $ parser = null ;
@@ -19,7 +19,7 @@ class Parser extends Common\AbstractOptions implements Common\OptionsInterface
1919 public function __construct ($ cachePath , array $ options = null )
2020 {
2121 $ this ->sanitizer = new Sanitizer ($ cachePath , $ options );
22- $ this ->sanitizer ->setOption ('HTML.Allowed ' , $ this ->filter );
22+ // $this->sanitizer->setOption('HTML.Allowed', $this->filter);
2323 $ this ->parser = new MarkdownParser ;
2424 }
2525
@@ -47,6 +47,13 @@ public function getFilterDefinition()
4747 return $ this ->filter ;
4848 }
4949
50+ public function setOptions (array $ options )
51+ {
52+ foreach ($ options as $ key => $ value ) {
53+ $ this ->setOption ($ key , $ value );
54+ }
55+ }
56+
5057 public function setOption ($ key , $ value )
5158 {
5259 $ this ->sanitizer ->setOption ($ key , $ value );
You can’t perform that action at this time.
0 commit comments