IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 4, 2010, 2:17:15 PM (16 years ago)
Author:
bills
Message:

protect against troublesome comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_request_file

    r28052 r29672  
    271271            exit 1;
    272272        }
    273         $comment = "null" if !$comment;
     273        if ($comment) {
     274            if ($comment =~ /#/) {
     275                print STDERR "WARNING '#' character removed from comment.\n";
     276                $comment =~ s/#/ /;
     277            }
     278            if (length($comment) > 63) {
     279                print STDERR "WARNING comment too long truncating to 63 characters.\n";
     280                $comment = substr($comment, 0, 63);
     281            }
     282        } else {
     283            $comment = "null";
     284        }
    274285        my @vals = split /$sep/, $spec;
    275286        my $nvals = @vals;
Note: See TracChangeset for help on using the changeset viewer.