Skip to content

Commit f114b3e

Browse files
committed
Some miscellaneous fixes to interface adherance
1 parent 78108ec commit f114b3e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

library/SecurityMultiTool/Csrf/Provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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'])) {

library/SecurityMultiTool/Http/Headers.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
namespace SecurityMultiTool\Http;
44

55
use 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();

library/SecurityMultiTool/Markdown/Parser.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use SecurityMultiTool\Exception;
88
use 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);

0 commit comments

Comments
 (0)