cacert-webdb/includes
Jan Dittberner 560be526c4 Fix client certificate login
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.
2024-05-05 20:08:53 +02:00
..
lib Fix client certificate login 2024-05-05 20:08:53 +02:00
.gitignore New file 2008-09-04 13:53:33 +00:00
about_menu.php Fix for https://bugs.cacert.org/view.php?id=897 2011-07-22 13:49:41 +00:00
account.php Use integer values for type when inserting into ordomaincerts 2023-07-14 18:06:10 +02:00
account_stuff.php Fix for https://bugs.cacert.org/view.php?id=929 2014-06-10 08:50:47 +00:00
general.php Change outgoing mail hostname to ping.cacert.org 2022-07-07 17:07:55 +02:00
general_stuff.php Bug 1440 2021-07-04 18:51:27 +00:00
keygen.php Fix for https://bugs.cacert.org/view.php?id=790 2014-12-05 09:08:43 +00:00
loggedin.php Fix client certificate login 2024-05-05 20:08:53 +02:00
mysql.php.sample Fix for https://bugs.cacert.org/view.php?id=1389 2015-08-28 15:40:09 +00:00
notary.inc.php Fix for https://bugs.cacert.org/view.php?id=1291 2014-08-09 09:13:02 +00:00
shutdown.php Changed license to GPLv2 2008-04-06 19:45:09 +00:00
sponsorinfo.php Remove old sponsoring links 2023-09-16 16:23:16 +02:00
tverify_stuff.php Fixes for https://bugs.cacert.org/view.php?id=965 : 2011-11-25 11:28:37 +00:00