]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Members.pm
Allow non member attackers to post own coords
[ndwebbie.git] / lib / NDWeb / Controller / Members.pm
index 3ac7f8bea00e32a096a8db0bedff9c9a69af5cba..b88574505f2f2e677794889564e97c268fbc7c3b 100644 (file)
@@ -163,7 +163,7 @@ sub postowncoords : Local {
                $c->flash(error => $c->req->param('planet') . " are not valid coords.");
        }
 
-       $c->res->redirect($c->uri_for(''));
+       $c->res->redirect($c->uri_for('/'.$c->session->{referrer}));
 }
 
 sub postfleetsupdates : Local {
@@ -595,7 +595,7 @@ sub parseconfirmations {
                |$returnetare)\s*/x;
        my $missre = qr/((?:Alliance\ Standby)|(?:(?:Fake\ )?\w+))\s*/x;
        if ($missions =~ m/
-               Ships \s+ Cla \s+ T\s?1 \s+ T\s?2 \s+ T\s?3 \s+ Base \s+ \(i\) \s (?<name>.+?) \s+ \(i\) \s+ (?<name>.+?) \s+ \(i\) \s+ (?<name>.+?) \s+ \(i\) \s+ TOTAL \s+
+               Ships \s+ Cla \s+ T\s?1 \s+ T\s?2 \s+ T\s?3 \s+ ETA \s+ Base \s+ \(i\) \s (?<name>.+?) \s+ \(i\) \s+ (?<name>.+?) \s+ \(i\) \s+ (?<name>.+?) \s+ \(i\) \s+ TOTAL \s+
                (?<ships>.+?)
                \QTotal Ships in Fleet\E \s+ (\d+) \s+ (?<amount>\d+) \s+ (?<amount>\d+) \s+ (?<amount>\d+) \s+
                Mission: \s* (?<missions>(?:$missre)*)  \s*
@@ -607,7 +607,7 @@ sub parseconfirmations {
                my @targets = split /\s+/, $+{targets};
                my @lts = split /\s+/, $+{lts};
                my @etas;
-               my $_ = $+{etas};
+               local $_ = $+{etas};
                while(/$etare/sxg){
                        push @etas, $1;
                }
@@ -664,7 +664,7 @@ sub parseconfirmations {
                        amount => 0,
                        ships => []
                };
-               while ($match{ships}->[0] =~ m/(\w[ \w]+?)\s+(FI|CO|FR|DE|CR|BS)[^\d]+((?:\d+\s*){5})/g){
+               while ($match{ships}->[0] =~ m/(\w[ \w]+?)\s+(FI|CO|FR|DE|CR|BS|--)[^\d]+\d+\s+((?:\d+\s*){5})/g){
                        my $ship = $1;
                        my @amounts = split /\D+/, $3;
                        my $base = shift @amounts;