Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5cf977e5

Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt

  • ID 5cf977e52788c523150fa19225b90914e6ddc909
  • Vorgänger ee3ab257
  • Nachfolger d7def35a

Quoten von allen in regulären Ausdrücken verwendeten Variablen, die direkt oder indirekt von Benutzereingaben stammen können. Fix für Bug 302.

Unterschiede anzeigen:

SL/Form.pm
2231 2231
    while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
2232 2232

  
2233 2233
      foreach my $key (split(/:/, $ref->{link})) {
2234
        if ($key =~ /$module/) {
2234
        if ($key =~ /\Q$module\E/) {
2235 2235

  
2236 2236
          # cross reference for keys
2237 2237
          $xkeyref{ $ref->{accno} } = $key;
......
2300 2300
    while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
2301 2301

  
2302 2302
      foreach my $key (split(/:/, $ref->{link})) {
2303
        if ($key =~ /$module/) {
2303
        if ($key =~ /\Q$module\E/) {
2304 2304

  
2305 2305
          # cross reference for keys
2306 2306
          $xkeyref{ $ref->{accno} } = $key;
......
2532 2532
  }
2533 2533
  $sth->finish();
2534 2534

  
2535
  my $printed = ($self->{printed} =~ /$self->{formname}/) ? "1" : "0";
2536
  my $emailed = ($self->{emailed} =~ /$self->{formname}/) ? "1" : "0";
2535
  my $printed = ($self->{printed} =~ /\Q$self->{formname}\E/) ? "1" : "0";
2536
  my $emailed = ($self->{emailed} =~ /\Q$self->{formname}\E/) ? "1" : "0";
2537 2537

  
2538 2538
  my %queued = split / /, $self->{queued};
2539 2539
  my @values;
......
2588 2588
    my %queued = split / /, $self->{queued};
2589 2589

  
2590 2590
    foreach my $formname (keys %queued) {
2591
      $printed = ($self->{printed} =~ /$self->{formname}/) ? "1" : "0";
2592
      $emailed = ($self->{emailed} =~ /$self->{formname}/) ? "1" : "0";
2591
      $printed = ($self->{printed} =~ /\Q$self->{formname}\E/) ? "1" : "0";
2592
      $emailed = ($self->{emailed} =~ /\Q$self->{formname}\E/) ? "1" : "0";
2593 2593

  
2594 2594
      $query = qq|INSERT INTO status (trans_id, printed, emailed, spoolfile, formname)
2595 2595
                  VALUES (?, ?, ?, ?, ?)|;
2596 2596
      do_query($self, $dbh, $query, $self->{id}, $printed, $emailed, $queued{$formname}, $formname);
2597 2597

  
2598
      $formnames  =~ s/$self->{formname}//;
2599
      $emailforms =~ s/$self->{formname}//;
2598
      $formnames  =~ s/\Q$self->{formname}\E//;
2599
      $emailforms =~ s/\Q$self->{formname}\E//;
2600 2600

  
2601 2601
    }
2602 2602
  }
......
2610 2610
  map { $status{$_}{emailed} = 1 } split / +/, $emailforms;
2611 2611

  
2612 2612
  foreach my $formname (keys %status) {
2613
    $printed = ($formnames  =~ /$self->{formname}/) ? "1" : "0";
2614
    $emailed = ($emailforms =~ /$self->{formname}/) ? "1" : "0";
2613
    $printed = ($formnames  =~ /\Q$self->{formname}\E/) ? "1" : "0";
2614
    $emailed = ($emailforms =~ /\Q$self->{formname}\E/) ? "1" : "0";
2615 2615

  
2616 2616
    $query = qq|INSERT INTO status (trans_id, printed, emailed, formname)
2617 2617
                VALUES (?, ?, ?, ?)|;

Auch abrufbar als: Unified diff