Skip to content

Commit

Permalink
Sanitise PeeringDB and IX-F data
Browse files Browse the repository at this point in the history
This follows d3b8a54
  • Loading branch information
barryo committed Mar 8, 2019
1 parent cd3401a commit b146a68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/Providers/PeeringDbServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public function boot(){
foreach( json_decode($ixs)->data as $ix ) {
$ixps[$ix->id] = [
'pdb_id' => $ix->id,
'name' => $ix->name,
'city' => $ix->city,
'country' => $ix->country,
'name' => htmlentities( $ix->name, ENT_QUOTES ),
'city' => htmlentities( $ix->city, ENT_QUOTES ),
'country' => htmlentities( $ix->country,ENT_QUOTES ),
];
}
}
Expand All @@ -63,7 +63,7 @@ public function boot(){
foreach( json_decode( $pdb )->data as $db ) {
$pdbs[ $db->id ] = [
'id' => $db->id,
'name' => $db->name,
'name' => htmlentities( $db->name, ENT_QUOTES ),
];
}
}
Expand Down
14 changes: 7 additions & 7 deletions routes/apiv4.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
foreach( json_decode($ixs)->data as $ix ) {
$ixps[$ix->id] = [
'pdb_id' => $ix->id,
'name' => $ix->name,
'city' => $ix->city,
'country' => $ix->country,
'name' => htmlentities( $ix->name, ENT_QUOTES ),
'city' => htmlentities( $ix->city, ENT_QUOTES ),
'country' => htmlentities( $ix->country, ENT_QUOTES ),
];
}
}
Expand All @@ -96,9 +96,9 @@
foreach( json_decode($ixs) as $ix ) {
$ixps[$ix->id] = [
'ixf_id' => $ix->id,
'name' => $ix->name,
'city' => $ix->city,
'country' => $ix->country,
'name' => htmlentities( $ix->name, ENT_QUOTES ),
'city' => htmlentities( $ix->city, ENT_QUOTES ),
'country' => htmlentities( $ix->country, ENT_QUOTES ),
];
}
}
Expand All @@ -114,7 +114,7 @@
foreach( json_decode( $pdb )->data as $db ) {
$pdbs[ $db->id ] = [
'id' => $db->id,
'name' => $db->name,
'name' => htmlentities( $db->name, ENT_QUOTES ),
];
}
}
Expand Down

0 comments on commit b146a68

Please sign in to comment.