Feb 26, 2007, 09:48 AM | |
When do you get this message? When voting for reviews through either the latest reviews page or the download info page I do not get that message.
That message should occur only if the http referrer does not contain 'jazz2online' to avoid people collecting helpful votes by tricking people into clicking links. Is it possible you were clicking the link from a different site, or have reporting referrers to sites off in your browser settings? I had never really considered people that don't broadcast a HTTP_REFERER (sic from http standard) header to the site. If anyone has an alternative that also supports preventing abuse while not needing this header, let me know.
__________________
Interesting Jazz-related links: Thread: Gameplay Theories - Thread: Make Up Your Own Gametype |
Feb 26, 2007, 09:58 AM | |
A verification code. Include and store a randomly generated code in the URLs for the helpful links when someone views the download page, and only accept the rating if the code matches.
__________________
With our extreme gelatinous apology,
We beg to inform your Imperial Majesty, Unto whom be dominion and power and glory, There still remains that strange precipitate Which has the quality to resist Our oldest and most trusted catalyst. It is a substance we cannot cremate By temperatures known to our Laboratory. ~ E.J. Pratt |
Feb 26, 2007, 12:23 PM | |
Nothing. It should work properly right now. That's why there are 2 questions for you:
1. When are you getting this error? On which page are you? Do you get it for all reviews? Etc. 2. Have you changed any browser security settings / installed any plugins? Aside from answering these questions so we can find out what the bug is, you can't do anything right now. Link: Do you mean storing the code in the database? Because the code would need to be unique and usable only in one instance. Such an idea would work but would be a rather large undertaking. It made me think of the following though: generate an md5 hash or something from the username + ip and check for that...
__________________
Interesting Jazz-related links: Thread: Gameplay Theories - Thread: Make Up Your Own Gametype Last edited by FQuist; Feb 26, 2007 at 12:35 PM. |
Feb 26, 2007, 12:46 PM | |
There are some misguided firewalls (*cough*norton*cough*) which eat the referer in the name of privacy. You could try allowing requests with no referer as well as requests with the correct referer, as people who follow links from off-site will usually send referer headers.
|
Feb 27, 2007, 06:24 AM | ||
Quote:
About allowing empty referrer headers - one of the things with allowing those is that we've had problems with people getting tricked on irc/instant messaging, which won't broadcast referrers.
__________________
Interesting Jazz-related links: Thread: Gameplay Theories - Thread: Make Up Your Own Gametype |
Feb 27, 2007, 09:21 AM | |
Thinking about it, md5'ing the ip (plus some magic number) would work quite well. Include that in a hidden field (or in the generated URL), and simply check that it's correct when the user submits the page. That prevents anyone being tricked into going straight to the submitReview.php or helpful.php page. Something along the lines of
Code:
$hash = hex(md5($_SERVER['REMOTE_ADDR'] . "super-sekrit-tek")); $url = $url . "&check=" . $hash ... $hash = hex(md5($_SERVER['REMOTE_ADDR'] . "super-sekrit-tek")); if ($_GET['check'] != $hash) { print ("Lame vote hacker detected"); exit(); } It should make it impossible for someone to trick someone else into voting for a review, but it won't stop anyone who decides to simulate a bot clicking on the link lots of times (that's what IP bans are for ![]() Oh, while I was looking I think I spotted an error in your HTML: on downloads/info.php, I couldn't see a closing FORM tag for the review form. |
Feb 27, 2007, 02:12 PM | |
/me attempts to validate http://www.jazz2online.com/J2Ov2/dow...p?levelID=4549
Eeep! (oddly enough, it didn't complain about the lack of /FORM. Yay for HTML's auto-closing of tags.) |
Feb 28, 2007, 03:34 AM | |
To be honest, I think that the amount of pages on J2O that close the form tag are barely into the two digits.
![]() ![]() Torkell, much thanks for your tips and even the prepared code ![]()
__________________
Interesting Jazz-related links: Thread: Gameplay Theories - Thread: Make Up Your Own Gametype |
Feb 28, 2007, 04:01 AM | |
/me actually bothers to look at the php docs
It looks like md5() outputs a hex string, so manually converting it to hex isn't needed (I thought md5() output the raw binary). (for reference, I guessed at the name hex(), but it turns out the function is actually called bin2hex()) Truncating the hash to 8 chars shouldn't be a problem, just make sure you do the same when you compare the hash later. |
Feb 28, 2007, 04:43 AM | |
I have that much experience =p
I would probably make a centralized function that can be used in different spots.
__________________
Interesting Jazz-related links: Thread: Gameplay Theories - Thread: Make Up Your Own Gametype |
![]() |
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 05:16 AM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.