mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 10:05:32 +03:00
[core] unexpected input generates a fail
because paranoïa is the way to security ! Should this be optional ? Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
2670a0e400
commit
3f36ca2a9b
1 changed files with 5 additions and 0 deletions
|
@ -146,8 +146,10 @@ abstract class BridgeAbstract implements BridgeInterface {
|
||||||
protected function validateData(&$data){
|
protected function validateData(&$data){
|
||||||
$validated=true;
|
$validated=true;
|
||||||
foreach($data as $name=>$value){
|
foreach($data as $name=>$value){
|
||||||
|
$registered=false;
|
||||||
foreach($this->parameters as $context=>$set){
|
foreach($this->parameters as $context=>$set){
|
||||||
if(array_key_exists($name,$set)){
|
if(array_key_exists($name,$set)){
|
||||||
|
$registered=true;
|
||||||
if(!isset($set[$name]['type'])){
|
if(!isset($set[$name]['type'])){
|
||||||
$set[$name]['type']='text';
|
$set[$name]['type']='text';
|
||||||
}
|
}
|
||||||
|
@ -197,6 +199,9 @@ abstract class BridgeAbstract implements BridgeInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!$registered){
|
||||||
|
$validated=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $validated;
|
return $validated;
|
||||||
|
|
Loading…
Reference in a new issue