Confirmed: Tutorial: How to crush client in 5 seconds

PeralelArt

Sergeant
First, go phone version

1. Open guild treasury
2. Click on medals
3. Set value to 999999999999
or higher
Screenshot_20181229-191006.png

Now, you don't have enough medals so you need to overpay with diamonds.
The value is too high (above Int32 limited [2^31], for those that know computer science)
Then the diamond value becomes negative.
IMG_20181229_191230_391.jpg

Don't click the button, cause
Boom
Screenshot_20181229-191016.png

Congatz, you crushed your game.



Option to fix:
Well, don't limit the donation amount.
Just show "Invalid in thr diamomds button" and don't crush the client.
 

Agent327

Overlord
Who the hell would want to donate that number of medals when what they have does not even comes close to it????
 
Last edited by a moderator:

Chalinna

I have a substantial amount of medailles so thank you for the information :)
 

PeralelArt

Sergeant
So tell me, who would want to donate 999999999999 medals to the guild?

Your UX is out of sync.
When you developing an Application pr Service, You can't know how the client will use it. So you have to avoid edge cases. Winch the 99999999999999999999 medals is one of them.


Let's say you have Bank company.
And there is a logic for account.
Fill your ID and the correct password, and you got access for your bank account.
You think, that people will fill in the textbox theid ID and pass.
I know that people (some) will try to Inject SQL or inject JS code to change the behavior of your Server.

Why would they do that for God sake?!?!
CAUSS THEY CAN. and this is an edge case that any server must be aware of.


Same for the 99999999999999999 medals.
It don't do something to servers but its definitely should be fixed asap
 

Agent327

Overlord
Why would they do that for God sake?!?!
CAUSS THEY CAN. and this is an edge case that any server must be aware of.


Same for the 99999999999999999 medals.
It don't do something to servers but its definitely should be fixed asap
So what do you do in that case? You post it on a public forum.

Smart thinking!!!!
 

Agent327

Overlord
You cut my quote and bring stuff out of context.

Again, this will crush client. No one wants to crush their game and then relog.
You really don't get it do you? If this really is as important as you think it is, you do not put it on a public forum!!!! You deliver a private message and you absolutely in no way ever present it as a tutorial!!!!!

What part of that do you not understand????
 

PeralelArt

Sergeant
You really don't get it do you? If this really is as important as you think it is, you do not put it on a public forum!!!! You deliver a private message and you absolutely in no way ever present it as a tutorial!!!!!

What part of that do you not understand????
Your part.
Why you're so raged, relax man.

Also, I sent a ticket. As always, support team referred me to the forum :)
And what is the problem with my tutorial? Doe this hacks the server by magic?
Well... No.

You can try different good and you will see different negative values, sometimes -1020, -270, -450, etc...
By clicking the button your client will crash due to an interval error (Cause you can't actually pay negative value)
 

Agent327

Overlord
Also, I sent a ticket. As always, support team referred me to the forum :)
Then it can not be as important as you think.

And what is the problem with my tutorial? Doe this hacks the server by magic?
Well... No.
Then it is a lousy tutorial. Apart from that you are the first one ever to offer a supposed bug as a tutorial. What does that tell you?

You can try different good and you will see different negative values, sometimes -1020, -270, -450, etc...
By clicking the button your client will crash due to an interval error (Cause you can't actually pay negative value)
So? Is that a bug? What idiot tries to donate what he/she does not have?

If this is what you like to do, go to the beta. There they would love your input.
 

Emberguard

FoE Team
Senior Forum Moderator
Ingame Moderator
I learned about this in coding class for Java - it's something hardwired into the way the integer class handles numbers. There's no way around it if you use int as a variable. Googling looks like HTML uses the same type of thing.

So sorry bud, but there is no limit placed by Inno, it's a limit on the actual coding language itself. The only fix is through a error handling exception (or use a class that is able to handle a larger amount which will also have its own limit), which as you can see they already have - it asks you to reload.
 

PeralelArt

Sergeant
I learned about this in coding class for Java - it's something hardwired into the way the integer class handles numbers. There's no way around it if you use int as a variable. Googling looks like HTML uses the same type of thing.

So sorry bud, but there is no limit placed by Inno, it's a limit on the actual coding language itself. The only fix is through a error handling exception (or use a class that is able to handle a larger amount which will also have its own limit), which as you can see they already have - it asks you to reload.
You did not got my post.

I know that there is a limits for value, cause memory. Int32 limit is 2^31

If you pass this limit, you will get negative value.
This negative values causes the bug.
The fix is: Show "Error" instead of "-2147....."
Then also check before sending request ro the server of the values is ok.
 

PeralelArt

Sergeant
I learned about this in coding class for Java - it's something hardwired into the way the integer class handles numbers. There's no way around it if you use int as a variable. Googling looks like HTML uses the same type of thing.

So sorry bud, but there is no limit placed by Inno, it's a limit on the actual coding language itself. The only fix is through a error handling exception (or use a class that is able to handle a larger amount which will also have its own limit), which as you can see they already have - it asks you to reload.
But it is a bug.
You complete misunderstood
 

Emberguard

FoE Team
Senior Forum Moderator
Ingame Moderator
It'd be better if it did what Desktop does and change to whatever amount is in your stock - however Desktop doesn't let you buy the rest with diamonds. Mobile does. Therefore Mobile lets you over ride whatever is in your current stocks because there's a reason for it to do so

Edit: Actually, which phone OS are you using? Trying this on Apple it's not coming up with a negative
 
Last edited:

Emberguard

FoE Team
Senior Forum Moderator
Ingame Moderator
9,223,372,036,854,775,807 is what's in the "donate" text field of the screenshot in the spoiler (was originally a bunch of 9's but it auto adjusted)

upload_2018-12-30_21-47-35.png
 

Emberguard

FoE Team
Senior Forum Moderator
Ingame Moderator
upload_2018-12-30_22-11-41.png


Alright yep - my apologies Peralel for misunderstanding, it appears to be a bug after all

Are you using Android? Mine was from Apple (app version 1.141.0).