15 Commits

Author SHA1 Message Date
Znote
1c3480f322 Fix paypal IPs, fix #467 2021-07-18 22:35:47 +02:00
Znote
6af276225f paypal IPN indentation fix 2021-07-18 22:34:17 +02:00
Evil Puncker
a00dbcfabd
bye bye trailing whitespaces (#442) 2020-08-02 14:48:13 +02:00
Stefan A. Brannfjell
d7996c7d1d
Update ipn.php 2020-02-19 13:57:54 +01:00
Stefan A. Brannfjell
febeb5e4e1
Update ipn.php 2020-01-10 18:51:47 +01: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
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
Felipe Siqueira Pinheiro
6fa7d19cf1 Fixed ipn.php SQL Inserts, more precisely, the row 'id' from znote_paypal table (#268) 2017-01-18 12:13:04 +01:00
Znote
f7057feba1 Adding getValue and sanitize function to ipn.php so the validation functions actually work. 2015-04-09 23:56:19 +02:00
Mark Samman
48363b655a Increase security of ipn.php 2014-10-29 19:36:39 +01:00
Mark Samman
7a265593b8 Fix SQL injection in ipn.php 2014-10-29 19:35:19 +01:00
Stefan Brannfjell
11f90bcab8 Paypal revised, should work now. #2 2014-02-02 03:26:39 +01:00
Stefan Brannfjell
ba07284044 Importing Znote AAC 1.5_SVN rev 168 to github. 2013-08-28 23:44:46 +02:00