473 Commits

Author SHA1 Message Date
divinity76
c5323dbc78 admin.php protection against XSS and CSRF (#367)
admin.php protection against XSS and CSRF
see https://github.com/Znote/ZnoteAAC/issues/361 for more info
2019-08-27 00:25:51 +02:00
divinity76
4c3c2fab1f better $postdata encoding (#366)
idk what stripslashes() was doing in there, but it was definitely a bug (there's no way the slashes in there, if any, had no purpose and could just be discarded.. right?)

in addition, post data with keys containing special characters (if any) was incorrectly encoded. a correct encoding loop goes like:

foreach ($_POST as $key => $value) {
	$req.="&".urlencode($key)."=".urlencode($value);
}
but the original code was only encoding the value, not the key... but even better than a custom encoding loop is to just use http_build_query(), which does the entire encoding loop for us :) so that's what i changed it to.
2019-08-26 02:12:53 +02:00
divinity76
3c15ead4cf "no content OK" is HTTP 204, not HTTP 200. (#365)
read section 6.3.5 of https://tools.ietf.org/html/rfc7231#section-6.3.5 for proof.
2019-08-26 02:11:18 +02:00
divinity76
01c5da322a html-encode dynamic values in buypoints.php (#364)
* add html encoding function

* html-encode dynamic values

important if the values contain special characters like '&<>"

(for example if $config['site_title'] is `AT&T` or `<AWESOMESERVER>`, the old code would generate invalid html, but this updated code will generate valid html.)
2019-08-26 02:11:02 +02:00
Evil Puncker
53dbc9fdd7 Updated login to work with newer 12 client (#362)
Added missing field, missing only world pvp type
2019-08-07 15:58:34 +02:00
gregorecruzeiro
8404f8e171 Update house.php (#359)
Fixed undefined index id when accessing house.php directly.
2019-04-25 17:29:39 +02:00
divinity76
d9cd81508b patch XSS vulnerability (#358)
the powergamers page was vulnerable to XSS/javascript injection, this should fix it.

XSS screenshot: https://i.imgur.com/4rJuWqY.png
XSS POC:

<form action="https://<censored>/powergamers.php" method="POST">
<input type="hidden" name="days[]" value="3" />
<input type="hidden" name="days[]" value="1&lt;script&gt;alert(&quot;XSS running!&quot;);&lt;/script&gt;" />
<input type="submit" value="click here to start xss" />
</form>
2019-04-19 21:23:57 +02:00
slawkens
c0fe9e5d85 Enable local SSL certificate verification (#356)
This fixes points being not delivered on same systems.

Also set the CURLOPT_SSLVERSION as stated here https://www.php.net/manual/de/function.curl-setopt.php#118536
2019-04-13 01:06:46 +02:00
Stefan A. Brannfjell
f5bbc78101
ipn.php: Verify peer and host in SSL
Security issue reported by @slawkens 

All wifi traffic is broadcasted - this means that any nearby sniffing devices can read your traffic. If you're connecting to a page through HTTP over public/unencrypted wifi you can assume that whatever information you are sending and receiving is public - all it takes is an attacker nearby with an antenna to read all that in plaintext. To perform a true MITM by having traffic flow through them, attackers can use technologies like WiFi pineapples or aircrack-ng to force users to connect to their wifi network.

Connecting over cable internet is much harder to intercept/mitm because you're not broadcasting your traffic for the whole neighborhood. In order to compromise this network an attacker will have to gain access to it somehow - either through physical access to a network port, malware installed on a host machine or router, etc. When an attacker has access to a network they then have to exploit that access through attacks such as ARP poisoning or HSRP spoofing. These attacks just MITM traffic - anyone on the network can still sniff (read, but not change) traffic, but keep in mind HTTPS traffic is still encrypted and can't be read.

https://security.stackexchange.com/questions/153148/how-easy-it-is-to-actually-perform-mitm-attack-these-days
2019-04-13 00:34:11 +02:00
Znote
ce3fcf3b51 Fixed OTHIRE forum accountAccess check 2019-04-12 02:32:07 +02:00
Znote
15689d3aed Fixed OTHIRE account registration bug 2019-04-04 00:53:28 +02:00
Znote
e64032e630 Fixed OTHIRE account registration bug 2019-04-04 00:49:32 +02:00
Znote
a76e468645 Retrieve descriptive vocation name if id is not configured. 2019-04-03 22:46:24 +02:00
Znote
9f95fa4bb8 Fix #353 2019-03-22 19:35:12 +01:00
Stefan A. Brannfjell
6fee46767b
Fix #351 - syntax error in register.php 2019-03-19 11:43:09 +01:00
Rodrigo Paixão
a3f2cce4aa -- Fix Create Account (Compatibility OTHire) (#350) 2019-03-18 22:54:13 +01:00
gregorecruzeiro
ca989223bc Fix admin_shop.php (#348)
Notice: Undefined index: points in admin_shop.php on line 61
2019-03-18 02:01:30 +01:00
Znote
7eebbde59e Fix #345 - Character Auction storage account
When storage_account_id is not configured in config.php and people want to try the character auction system
Give them an error message instead of a query crash. Telling them to edit config.php properly.
2019-03-18 01:53:38 +01:00
Znote
63357290a0 Fix #346 Uneccesary OTHire engine logic separation
There is no need to create a separate configs for OTHIRE when establishing an SQL connection,
and is confusing for new users who are configurating their webserver.
2019-03-17 19:43:41 +01:00
Znote
44839d9cdb Fix #303 SQL error when joining a guild when your already in another guild 2019-03-17 19:07:45 +01:00
Znote
32bbecd266 Fix ##295 Rounding discount in buypoints 2019-03-17 14:53:11 +01:00
Znote
effe5d2b8e Adding page specific class to layout body 2019-03-17 01:41:03 +01:00
Znote
58e6300cf7 Fix #287 characterprofile table design 2019-03-17 01:38:29 +01:00
gregorecruzeiro
e8a57cbac3 Update toponline.php site_title and type (#347)
* Update toponline.php site_title and type

Parse error: syntax error, unexpected 'site_title' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\znote\toponline.php on line 40
Notice: Undefined index: type in C:\xampp\htdocs\znote\toponline.php on line 10
2019-03-14 09:18:50 +01:00
Rodrigo Paixão
bbd0455463 Admin Page - Compatibility OTHire (#342)
-- Fix for Admin Page in OTHire
2019-03-12 15:35:02 +01:00
Znote
9c80585ef9 Character Auction System 2019-03-10 18:53:24 +01:00
Znote
deebe044b1 CSS fixes for outfit image in highscore and character auction 2019-03-10 13:01:06 +01:00
Znote
fbcaa6e7e4 #More visually compatible house filtering 2019-03-10 11:58:56 +01:00
Kristoffer Eklund
00828a9f70 update PHPMailer info (#341) 2019-03-08 22:16:41 +01:00
Kristoffer Eklund
5dbee1cd46 PHPMailer 6.0 support (#340)
* PHPMailer 6.0 support

* dont require the PHPMailer files until sendMail is called

* cs fixes
2019-03-08 21:20:38 +01:00
Znote
e13bda4df1 New credits page. 2019-03-05 19:19:31 +01:00
Znote
b0cafe4927 Import schema: Moved all insert statements to the end of schema. 2019-02-06 22:25:42 +01:00
Znote
594e2c015f Market: Display error message instead of crashing if fail to load items.xml file. 2019-02-05 00:44:47 +01:00
Elime1
9404c902f5 Small voting box improvement (#337)
* Add OTServers.eu voting

* Hide voting by default and use simple vote url if the user isn't logged in

* Fix indentation

* Convert to tabs

* Convert to tabs
2019-01-26 03:42:03 +01:00
Alvaro Carvajal
f79a48fc06 Update itemlistparser (#336)
* Improve itemlistparser. Remove ugly cache file

* Convert item id to int, remove items variable
2019-01-10 22:56:05 +01:00
AdrianRomeroCSE
590dc37d28 Fixing username recovery in recovery.php (#335)
When trying to recover username, the password input would show.
2018-12-21 16:42:00 +01:00
Rodrigo Paixão
ab4c9bed4f Fix Players Online Page (OTHire Compatibility) (#334)
- Now you can see players outfits in page.
2018-12-21 16:39:35 +01:00
Rodrigo Paixão
7146a77bff Fix Recovery Page (OTHire Compatibility) (#333)
- Now you can recover your account number or password
2018-12-21 16:39:19 +01:00
Rodrigo Paixão
9a9bbec068 Added Monster Loot Checker (#332)
>> Original script
https://otland.net/threads/monster-loot-checker.24473/

- Added compatibility with Znote AAC
- Fixed by me, a vulnerability of Cross-Site Scripting (XSS Attack)
2018-12-14 15:05:41 +01:00
Rodrigo Paixão
01422f4815 Fix highscores (OTHire compatibility) (#331)
- Fixed showing outfit in highscores.
2018-12-14 13:10:19 +01:00
Rodrigo Paixão
2817010781 Compatibility with OTHire (#330)
* Preparing compatibility to OTHire

* Still working on compatibility to OTHire

* More compatibility

* More compatibility

Not tested yet

* Some fixes

- Fixed Account Creation.
- Fixed a problem that you can't load the website, that include that you can now recover your account number.

* More fixes

- Fixed character creation.
- Fixed login problem.
- Fixed displaying account number in My Account.
- Fixed displaying if you have premium days or not in My Account.

* More fixes

- Handle Kills/Deaths as TFS_03

* More fixes

- Fixed showing outfits in character profile
- Fixed displaying player houses in character profile
- Fixed displaying guilds

* Update init.php
2018-12-03 07:58:29 +01:00
Elime1
0d51f87c76 Add OTServers.eu voting (#326) 2018-08-06 11:01:52 +02:00
rwxsu
8788aa450c Prefix http or https if user hasn't explicitly set (#327)
* Prefix http or https if user hasn't explicitly set

Adding this because href prefixes the server's url if http:// or https:// is not provided.

* Fixed whitespace
2018-08-06 10:51:37 +02:00
slawkens
0478566020 Refactor Google ReCaptcha code (#325)
Removed duplicated code (store it in function/general.php)

Captcha doesn't need cURL (made it configurable and optional)
2018-06-04 12:41:49 +02:00
Joseph Bingham
b6f30e63fc Tibia client 11.49.5921 support (#323)
Adds additional login-session-data that was introduced in the Tibia 11.49.5921 client update.
2018-05-24 13:43:48 +02:00
Stefan A. Brannfjell
f72815e23d
IP Changer changed from otland to jo3bingham
It is open source, and does not give a false virus threat. And jo3bingham is awesome.
2018-01-23 12:37:32 +01:00
Znote
deea3599be spells.php TFS 0.3.6 compatibility. 2018-01-11 23:12:17 +01:00
Znote
c197b4de4f House bidding fix 2017-12-23 13:54:35 +01:00
Glom83ersik
7a79460c1c Update README.md (#317) 2017-12-10 20:45:58 +01:00
Glom83ersik
c9f0da4d9e Update guildwar.php (#316)
New structure in guildwar.php
2017-12-06 16:24:58 +01:00