Jan Dittberner
560be526c4
This change fixes the client certificate login for cases where duplicate serial numbers have been issued and recorded in the emailcerts table. Email addresses from the client certificate are used as an additional matching parameter. - includes/lib/general.php got a new function get_email_addresses_from_client_cert to create an array of email addresses from the environment variables set by Apache httpd - includes/loggedin.php and www/index.php use the new function to pass email addresses to the get_user_id_from_cert function - get_user_id_from_cert in includes/lib/general.php has been enhanced to use a JOIN over the emailcerts, root_certs and email tables. All parameters are escaped via mysql_real_escape_string - SQL errors in get_user_id_from_cert are now handled - a match from get_user_id_from_cert is only returned when there is exactly one row in the result set The code and the used query have been tested with Apache 2.4.10 and PHP 5.6 from Debian Jessie and a MariaDB 10.11 in strict mode using a container based test setup to match the current production setup as close as possible. |
||
---|---|---|
.. | ||
api | ||
cats | ||
certs | ||
docs | ||
iistutorial | ||
images | ||
logos | ||
policy | ||
siteimages | ||
styles | ||
tverify | ||
utf8_to_ascii | ||
.htaccess | ||
ac.js | ||
ac.php | ||
account.php | ||
advertising.php | ||
alert_hash_collision.php | ||
analyse.php | ||
cap.html.php | ||
cap.php | ||
capnew.php | ||
coap.html.php | ||
coapnew.php | ||
disputes.php | ||
error403.php | ||
error404.php | ||
favicon.ico | ||
gpg.php | ||
help.php | ||
index.php | ||
keygenIE.js | ||
logos.php | ||
news.php | ||
rss.php | ||
sealgen.php | ||
sqldump.php | ||
src-lic.php | ||
stats.php | ||
ttp.php | ||
verify.php | ||
wot.php |