Permalink
Browse files

Exit if bad data returned by name_scan

  • Loading branch information...
1 parent de4c047 commit f1c3e4389c5f4a6e9dd8f885eceb70512b505184 @khalahan committed Oct 23, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 namescan.php
View
@@ -12,6 +12,12 @@
#$name_scan[] = array('name'=>'d/test','value'=>"{\"info\":{\"registrar\":\"http://register.dot-bit.org\"},\"map\": {\"\": \"46.137.88.107\", \"www\": \"46.137.88.107\"} }");
#$name_scan[] = array('name'=>'d/test','value'=>"{\"info\":{\"registrar\":\"http://register.dot-bit.org\"},\"dns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"],\"map\":{\"\":{\"ns\":[\"ns0.web-sweet-web.net\",\"ns1.web-sweet-web.net\"]}}} ");
+// Exit if bad data
+if(!count($name_scan) && !isset($name_scan[0]['name'])) {
+ echo 'No data';
+ exit;
+}
+
// no change in name_scan
$backup = @file_get_contents($cacheDir.'name_scan');
if($backup == md5(serialize($name_scan))) {

0 comments on commit f1c3e43

Please sign in to comment.