Change to Scan IDs
For people coding external tool sites that wish to parse scans, it is rather useful to store the IDs of scans and scan groups, usually inside a database. Fortunately the biggest number an Integer (as defined by the ANSI SQL standard) can take is 2.1 billion, and so it should be no problem.
Unfortunately it seems that PA uses IDs bigger than this. Why on earth you need more than 2 billion possible IDs I do not know. In an attempt to provide an open source and easily accessible tools set, this becomes a problem for myself and others. (In order to maintain my database agnostic stance -part of the easily accessible thing- I must accept that there is no such thing as a "BigInteger".) Please could the code for generating these IDs be modified to resolve this problem? Shouldn't take more than 5 minutes :) Thanks |
Re: Change to Scan IDs
As mentioned in #support, we used an unsigned integer.
We use a wide number to make it impossible for an alliance to go through all potential numbers and 'steal' scans. |
Re: Change to Scan IDs
Thanks for discussion in #support.
In light of Cin's plans for the future I will change my storage strategy. |
Re: Change to Scan IDs
on a side note, could you get by with just using a string ellonweb? they probably use an integer in order to randomize them. since the number is already generated and won't change you can probably use a string and just concatenate the url to create a link?
|
Re: Change to Scan IDs
Not very elegant though.
|
Re: Change to Scan IDs
Cin's future plan involves switching scan ids to alphanumerics, so yeh I'll use a string. When you think about it, the id doesn't actually represent anything, it is just a key to get at the data so while storing a number as a string is usually a horrible thing, in this case it's not so bad. And I'll be future-compatible.
On a side note Cin said the change won't be made for this round (on scans, anyway), and when it does he'll make sure to give plenty of advance warning for those operating tool sets. :up: |
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
ITT, Cin shows how much PA Team cares about its users. Keep up the good work, Cin!
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
I'd guess to make it even harder (re: so very unlikely that alliance techs wont consider wasting time trying) to randomly guess scan-links to 'steal' scans? Liklihood of succeeding in guessing a 10-digit alphanumeric id is same as guessing a ~15-digit numerical one. And shorter ids look nicer. Probably other reasons too :(
I like this move by pa! Don't get why cin is getting mild abuse for it, but I guess that's to be expected from the pa community. |
Re: Change to Scan IDs
Quote:
Probability of guessing a 10 character alphanumeric ( case sentitive ) : 1 / 62^10 = 1 / 839299365868340224 Probability of guessing a 15 character numeric : 1 / 10^15 = 1/ 1000000000000000 They really arent similar :) |
Re: Change to Scan IDs
Wow! there's 26 letters in the alphabet... I was using 24, shudda paid more attention to GCSE english innit.
1/ 1000000000000000 1 / 3656158440062976 And they are more than comparable when you're discussing orders of magnitude :( Granted I didn't think of case sensitivity. |
Re: Change to Scan IDs
If that is really the reason, you're solving a problem that doesn't even exist. No sane human being is going to bother finding scans in a pool of 2^32 IDs, especially when you keep in mind that it serves no practical good whatsoever.
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
I don't care, it's useless?
|
Re: Change to Scan IDs
I think pa are just trying to get people to stop attempting it (whether they succeed or not, the server is still getting bombarded). So decreasing the chances of guessing correctly by vast orders of magnitude should help deter the idiots.
|
Re: Change to Scan IDs
tbh i would go the other way and generate a fake scan for those bombarding it with urls - just to mess with them.
|
Re: Change to Scan IDs
Afaik (no word from Cin if this is the reason) there is a weakness in the current ID generation, and it is possible to 'steal' some scans in some fashion.
|
Re: Change to Scan IDs
it boggles the mind as to how on earth something which should be as simple as a random number can be implemented wrong
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
Quote:
ID change has been made, it applies both to scan and stored news IDs. Both are a 15 char long alnum, so the urls and bbcode tags look like this: show_news.pl?id=4s7hs81rladx2au showscan.pl?scan_id=3vfbj73gleoihab [scan]3vfbj73gleoihab[/scan] |
Re: Change to Scan IDs
those samples dont look case sensitive to me, does the implementation include capitals as well?
|
Re: Change to Scan IDs
Quote:
Quote:
|
Re: Change to Scan IDs
Quote:
http://perl.active-venture.com/pod/func/srand.html Quote:
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
Thing is though, even if it's not perfectly random, it doesn't really matter, because the vulnerable information is of little to no value. So instead of wasting time on coding shit like this, perhaps it would be a good idea to,oh, I dunno, improve the game?
|
Re: Change to Scan IDs
Quote:
|
Re: Change to Scan IDs
Quote:
"ZOMG I stole a scan done 4 ticks ago on a planet with 2 distorters, I'm so l33t" |
Re: Change to Scan IDs
Quote:
I don't see the problem. |
All times are GMT +1. The time now is 03:06. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018