Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 27260)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 27356)
@@ -258,7 +258,7 @@
 
     # Temporary hack so that MOPS can get at non-magicked data
-    if ($product and ($product eq "mops-pstamp-results")) {
-        $need_magic = 0;
-    }
+#    if ($product and ($product eq "mops-pstamp-results")) {
+#        $need_magic = 0;
+#    }
 
     # For "stamp" and "list_uri" jobs collect rows with the same images of interest in a list so that they
@@ -285,4 +285,12 @@
         if (!$skycenter) {
             print STDERR "center must be specified in sky coordintes for bycoord" if $verbose;
+            insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
+            $num_jobs++;
+            next;
+        }
+    }
+    if (($req_type eq "byid") or ($req_type eq "bydiff")) {
+        if (!validID($id)) {
+            print STDERR "ID must be a positive integer for req_type $req_type\n" if $verbose;
             insertFakeJobForRow($row, 1, $PSTAMP_INVALID_REQUEST);
             $num_jobs++;
@@ -368,6 +376,6 @@
         if (($stage ne "stack") and ($need_magic and !$image->{magicked})) {
             # XXX: should we add a faulted job so the client can know what happened if no images come back?
-            # This test is made in locate_images now so this code never runs. This leads to no feedback
-            # to users, but speeds up processing significatnly
+            # The test for destreaked is made in locate_images now so this code never runs. This leads to no feedback
+            # to users, but speeds up processing significantly
             print STDERR "skipping non-magicked image $imagefile\n" if $verbose;
 
@@ -859,5 +867,15 @@
     my $val = shift;
 
-    return $val =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
+    return 0 if !defined $val;
+
+    return ($val =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/);
+}
+sub validID
+{
+    my $val = shift;
+
+    return 0 if !$val;
+
+    return  ! ($val =~ /\D/);
 }
 
