Commit Graph

6 Commits (5f89d4803602939e2b860e24f96ba58b9fb2b830)

Author SHA1 Message Date
Jan Dittberner 5f89d48036 Remove leftover header call 5 months ago
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.
5 months ago
Wytze van der Raay 42f16aab95 Combined fixes for
- https://bugs.cacert.org/view.php?id=413
  "Add a web page indicating the certificate request is still pending"
- https://bugs.cacert.org/view.php?id=1138
  "Implement to log the SE activity"
- https://bugs.cacert.org/view.php?id=1221
  "Inconsistency in Assurance Management"
10 years ago
Wytze van der Raay ee7e7f6009 Fix for https://bugs.cacert.org/view.php?id=512
"Org admins must have 100 points"
12 years ago
Wytze van der Raay 316ef65915 Fix for https://bugs.cacert.org/view.php?id=978
"Invalid SPKAC requests are not properly validated"
12 years ago
Wytze van der Raay d98d23ff5b Fix for https://bugs.cacert.org/view.php?id=841
(Problems on cert login with "duplicate" serial numbers)
13 years ago