Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

I am an idiot.

  • Loading branch information...
commit 1c417b7775c9c5b22600c6e82f73e85a4587f012 1 parent fc9b445
@Kwpolska authored
Showing with 6 additions and 6 deletions.
  1. +3 −3 content/contact/antibot.php
  2. +3 −3 content/media/js/vfbp.js
View
6 content/contact/antibot.php
@@ -62,13 +62,13 @@
if(isset($_POST['json'])) {
# JSON scheme:
- # {"vfbpjs": "auth", "token" = "TOKEN"}
+ # {"vfbpjs": "auth", "token": "TOKEN"}
$json = json_decode($_POST['json']);
if($json['token'] = $_SESSION['vfbpjstoken']) {
$_SESSION['vfbpjsauth'] = true;
- echo '{"vfbpjs": "results", "auth" = "true"}';
+ echo '{"vfbpjs": "results", "auth": "true"}';
} else {
- echo '{"vfbpjs": "results", "auth" = "false"}';
+ echo '{"vfbpjs": "results", "auth": "false"}';
}
}
?>
View
6 content/media/js/vfbp.js
@@ -37,10 +37,10 @@ function vfbpauth() {
cache: false
});
$.post("http://kwpolska.tk/contact/antibot.php",
- {'json': '{"vfbpjs": "auth", "token" = "'+$('[name="vfbpjstoken"]').val()+'"}'},
+ {'json': '{"vfbpjs": "auth", "token": "'+$('[name="vfbpjstoken"]').val()+'"}'},
function(data) {
- var rdata = $.parseJSON(data);
- if(rdata.auth == "true") {
+ document.write($.parseJSON(data));
+ if($.parseJSON(data).auth == "true") {
$('#vfbpjsresults').html = 'Authenticated as a human being! (or a bot with JS support)';
$('[name="vfbpq"]').val('[ignored]');
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.