Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: SSL_SERVER_CERT in /var/www/html/teampass/sources/core.php #1885

Closed
KB7777 opened this issue Aug 28, 2017 · 4 comments
Closed

Comments

@KB7777
Copy link

KB7777 commented Aug 28, 2017

Is it something to worry about?

Steps to reproduce

  1. just clicking

Expected behaviour

Page works fine

Actual behaviour

Page works fine, but httpd ssl error logs:

[Mon Aug 28 12:39:51.472058 2017] [php7:notice] [pid 32162] [client 10.151.40.57:53709] PHP Notice: Undefined index: SSL_SERVER_CERT in /var/www/html/teampass/sources/core.php on line 286, referer: https://caprica.domain.pl/index.php?page=manage_settings
[Mon Aug 28 12:39:51.472181 2017] [php7:warn] [pid 32162] [client 10.151.40.57:53709] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/teampass/sources/core.php on line 289, referer: https://caprica.domain.pl/index.php?page=manage_settings

and similar -- manage_folders, manage_main, etc.

Server configuration

Operating system:
CentOS 7.3

Web server:
Server version: Apache/2.4.6 (CentOS)

Database:
mysql Ver 15.1 Distrib 10.2.8-MariaDB, for Linux (x86_64) using readline 5.1

PHP version:
PHP 7.1.8 (cli) (built: Aug 2 2017 12:13:05) ( NTS )

Teampass version:
2.1.27.7

Client configuration

Browser:
Chrome, Opera

Operating system:
Windows 10

@nilsteampassnet
Copy link
Owner

I believe you have have enabled HTTPS Strict Transport Security.
Here I need to improve the code by testing this value before using it.
But nevertheless, you have an issue in your configuration.
Is your certificate is not self signed?
In apache's SSL configuration is the option "SSLOptions +ExportCertData" enabled?

@KB7777
Copy link
Author

KB7777 commented Aug 29, 2017

Yes, HTTP STS enabled.
Now added "SSLOptions +ExportCertData" and the result is:

[Tue Aug 29 07:56:38.509501 2017] [php7:notice] [pid 30056] [client 10.151.40.57:35161] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=items
[Tue Aug 29 07:56:50.697660 2017] [php7:notice] [pid 30057] [client 10.151.40.57:35167] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=items
[Tue Aug 29 07:58:03.105216 2017] [php7:notice] [pid 30056] [client 10.151.40.57:35221] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=find
[Tue Aug 29 07:58:07.451324 2017] [php7:notice] [pid 30056] [client 10.151.40.57:35221] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=favourites
[Tue Aug 29 07:58:17.902524 2017] [php7:notice] [pid 30067] [client 10.151.40.57:35233] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=items
[Tue Aug 29 07:58:26.477324 2017] [php7:notice] [pid 30068] [client 10.151.40.57:35243] PHP Notice: Array to string conversion in /var/www/html/teampass/sources/core.php on line 290, referer: https://caprica.domain.pl/index.php?page=find

P.S. And yes, I have my cert from my local CA:
SSLCertificateFile /etc/ssl/certs/caprica.domain.pl.cer
SSLCertificateKeyFile /etc/ssl/certs/caprica.domain.pl.key

nilsteampassnet added a commit that referenced this issue Aug 29, 2017
Fix for #1880, #1881 and #1885
@nilsteampassnet
Copy link
Owner

Would it be possible for you to make the next test?

Open file /sources/core.php
Scroll to line 288, you should read $cert_issuer = "";
Just after add a new line with print_r($server_cert['issuer']);
Save the file
Refresh the page ... it should display some data.
Can you make a copy of this data and send it by email to me (nils@teampass.net)?
Remove the line you have added.

@KB7777
Copy link
Author

KB7777 commented Aug 29, 2017

There is no special data :) Just page reloads :)

nilsteampassnet added a commit that referenced this issue Aug 31, 2017
Fix for #1888
Fix for Cert check in #1885 context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants