PDA

View Full Version : Evil bug



rasqual
08-19-2005, 08:12 AM
Mickey -

I was very evil tonight. But I found a definite bug.

It's easily possible to use other people's armies to soften up an enemy.

Here's what I did.

First, I added some armies, and noted the first "army number." I hadn't added any armies for a while, so I inferred that a slightly lower army number would belong to someone else.

Second, I used a bookmarklet to change the http POST method on your attack form to a http GET method. Here's the bookmarklet:

javascript:(function(){var x,i; x = document.forms; for (i = 0; i < x.length; ++i) x[i].method="get"; alert("Changed " + x.length + " forms to use the GET method. After submitting a form from this page, you should be able to bookmark the result."); })();

Third, I did an attack (on you) with one of my own armies, which let me see the URL for the http GET. I then changed the URL to use a different army number, and attacked you again. This resulted in someone else's army attacking you.

I did this twice, to confirm the numbers. Here was my first run, using army 1600:


Attacker size: 100 troops
Defender size: 40 troops

[...]

Defending army killed (19).

Attacker size: 32 troops
Defender size: 100 troops

[...]

Attacking army killed (Nic60264).

And here was my second, using army 1550:


Attacker size: 100 troops
Defender size: 93 troops

[...]

Defending army killed (20).

Attacker size: 90 troops
Defender size: 100 troops

[...]

Defending army killed (21).

Attacker size: 90 troops
Defender size: 100 troops

[...]

Attacking army killed (Thalidon35495).

I figured -- and I hope I figured correctly -- that you could restore the lost armies to yourself and to these other players. If not, I owe 'em (and you) when it comes time to trade assets.

I confirmed that my own troop strengths didn't change at all.

Yikes! This one's weird. I hit refresh by mistake, effectively pitting the killed 1550 army against you again. I came up with this:


Attacker size: troops
Defender size: 31 troops

Defending army lost 30 troops.
Attacking army lost 17 troops.

Attacking army killed ().

Incredulous, I hit refresh yet again, and came up with this:


Attacker size: troops
Defender size: 1 troops

Defending army lost 47 troops.

Defending army killed (22).

Attacker size: troops
Defender size: 100 troops

Attacking army lost 31 troops.

Attacking army killed ().

Not good! It looks as if some kind of army wraith retained enough potency to do a number on your troops. Something is VERY funky there.

HTH. Sorry for the mess.

rasqual
08-19-2005, 08:22 AM
LOL

Well, I found a way I might be able to pay those guys back.

I figured I'd see what would happen if I tried to mess with other people's armies. So I went to one of my armies' page, and then tried to change the army number in the URL. I got the message that said that wasn't my army. So I ran the bookmarklet to change the POST in your "add troops" form to a GET, and added troops to my army. I then changed the URL to specify army 1540, and fired it off. I ended up bumping nominev11960 three times, 10 troops each time. And the Geos deducted from my own account. I'll presume they didn't deduct from his as well.

So hey, we have a way to help other people! We can bump their armies from our own account of geos! Yeah, this is a bug, but in another form this would be one of the features you're about to implement. ;-)

Again, HTH. Not much mess this time, though. Nominev, enjoy the mercenaries I sent you!

rasqual
08-19-2005, 08:50 AM
OK, yet another. I thought I'd look for a solution to the oil well problem -- not enough room for people to add wells. I noted the URL on the "build oil well here?" node in the places pane in Earth, and added Lon and Lat to it, thus:

http://www.[...].com/war/makeoilwell.php?44.689,23.575

I whacked Enter, and had a well. Then I figured I'd try to create a couple more, with no respect at all for distance from the other well. That was simple enough:

http://www.[...].com/war/makeoilwell.php?44.67,23.56
http://www.[...].com/war/makeoilwell.php?44.66,23.55
http://www.[...].com/war/makeoilwell.php?44.65,23.54

My results were a bit inconsistent. I don't see these wells on the map. Only two of them showed up in my list.

I thought I'd try something else:

http://www.[...].com/war/makeoilwell.php?48.344,23.057

That's a couple hundred miles NE of the oil field's NE boundary. It seems to have created an oil well! I don't see it, but it shows up in my list. Hard to tell which one it is, though.

Finally, I couldn't resist trying to drill off Galveston:

http://www.[...].com/war/makeoilwell.php?-94.52,29.04

That well looks to be pretty good -- my second-best, in fact. Dag!

;-)

Again, no well shows up in Earth near Galveston.

Again, sorry for the mess. By all means kill any wells I created tonight. I made the links above useless to click so no one would make more of a mess by accident.

HTH.

Mickey
08-19-2005, 12:19 PM
But I found a definite bug.
Not a bug, but certainly some loopholes.



It's easily possible to use other people's armies to soften up an enemy.
Fixed (I think).



Yikes! This one's weird. I hit refresh by mistake, effectively pitting the killed 1550 army against you again. I came up with this:
Fixed (I think).



Yeah, this is a bug, but in another form this would be one of the features you're about to implement.
Fixed for now. Will be reimplemented as a real feature shortly.


OK, yet another. I thought I'd look for a solution to the oil well problem -- not enough room for people to add wells. I noted the URL on the "build oil well here?" node in the places pane in Earth, and added Lon and Lat to it, thus:

http://www.[...].com/war/makeoi...p?44.689,23.575
First, FWIW, those lat and lon numbers you added were meaningless. The system tracks which locations it asks if you'd like to build on. If you say yes (makeoilwell.php), it grabs the most recent location and puts a well there. In your case, this means you had like 8 wells at the same spot. :)

It now checks and doesn't allow multiple wells at the same coordinates (I think). Also, after you create the "X" on the map, you have 60 seconds to place the well. This should help prevent people from coming back and trying to re-place old wells.

By all means, check my work - try to break it some more. This is good stuff!

rasqual
08-19-2005, 03:29 PM
Yeah, it's fun to poke around.

BTW, at some point in the future, resources will need to be part of the same geographic segregation approach as cities, armies, and so forth. That is, making them not so easy to "drop in from space" to make use of. I suspect that regional resources will strengthen alliances by creating something surrounding (geographically surrounding) governments will have a stake in defending against foreign explotation. If natural resoures are the only hope of economic viability, then governments (players and their alliances) will be very protective of them. We're seeing this just now, with everyone's concern about the availability of oil wells.

Something like that, blah blah blah.