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

Displaying wrong names #1674

Closed
yasiryagi opened this issue Mar 2, 2017 · 7 comments
Closed

Displaying wrong names #1674

yasiryagi opened this issue Mar 2, 2017 · 7 comments
Labels

Comments

@yasiryagi
Copy link

yasiryagi commented Mar 2, 2017

Expected behaviour

Tell us what should happen
First and last names of the user should be displayed in the welcome message in the right top corner

Actual behaviour

Tell us what happens instead
The displayed flirst and last names of another user is displayed for the user.

Server configuration

Operating system:
Ubuntu 16.04.2 LTS

Web server:
Apache/2.4.18

Database:
mysql Ver 14.14

PHP version:
HP 7.0.15

Teampass version:
2.1.27

Updated from an older Teampass or fresh install:
Fresh

Client configuration

Browser:
Chrome

Operating system:

Logs

Web server error log

I am not sure the log below is related but it is also an issue that I see

[Thu Mar 02 07:31:25.239399 2017] [:error] [pid 20811] [client x.x.x.x:53194] PHP Notice:  Undefined index: SSL_SERVER_CERT in /var/www/html/sources/core.php on line 276, referer: https://x.x.x.x/index.php?page=items
[Thu Mar 02 07:31:25.239491 2017] [:error] [pid 20811] [client x.x.x.x:53194] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/sources/core.php on line 278, referer: https://x.x.x.x/index.php?page=items
[Thu Mar 02 07:31:25.239511 2017] [:error] [pid 20811] [client x.x.x.x:53194] PHP Notice:  Undefined variable: cert_issuer in /var/www/html/sources/core.php on line 286, referer: https://x.x.x.x/index.php?page=items
[Thu Mar 02 07:31:25.514521 2017] [:error] [pid 20808] [client x.x.x.x:53205] PHP Notice:  Undefined index: SSL_SERVER_CERT in /var/www/html/sources/core.php on line 276
[Thu Mar 02 07:31:25.514593 2017] [:error] [pid 20808] [client x.x.x.x:53205] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/sources/core.php on line 278
[Thu Mar 02 07:31:25.514611 2017] [:error] [pid 20808] [client x.x.x.x:53205] PHP Notice:  Undefined variable: cert_issuer in /var/www/html/sources/core.php on line 286
[Thu Mar 02 07:31:53.486053 2017] [:error] [pid 20811] [client x.x.x.x:53229] PHP Notice:  Undefined index: SSL_SERVER_CERT in /var/www/html/sources/core.php on line 276, referer: https://x.x.x.x/index.php?page=items
[Thu Mar 02 07:31:53.486338 2017] [:error] [pid 20811] [client x.x.x.x:53229] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/sources/core.php on line 278, referer: https://x.x.x.x/index.php?page=items
[Thu Mar 02 07:31:53.486515 2017] [:error] [pid 20811] [client x.x.x.x:53229] PHP Notice:  Undefined variable: cert_issuer in /var/www/html/sources/core.php on line 286, referer: https://x.x.x.x/index.php?page=items


In teampass log section it reports the following

Query: SELECT u.login as login, i.id as id, i.label as label, i.id_tree as id_tree, l.date as date, n.title as folder_title FROM teampass_log_items as l INNER JOIN teampass_items as i ON (l.id_item=i.id) INNER JOIN teampass_users as u ON (l.id_user=u.id) INNER JOIN teampass_nested_tree as n ON (i.id_tree=n.id) WHERE i.inactif = 1 AND l.action = 'at_delete' GROUP BY l.id_item<br />Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'TeamPass.u.login' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by<br />@	
@yasiryagi
Copy link
Author

So I figured that the Apache logs are not related to the issue but rather to my self signed certificate and STS.

I can also confirm the log below is related to the issue. I managed to reproduce it, it happens when admin creates or deletes a user, specifically when assigning a role this when the visible change on the name on the top right corner. While the log below is created for both user creation and role assignment.

**
Query: SELECT u.login as login, i.id as id, i.label as label, i.id_tree as id_tree, l.date as date, n.title as folder_title FROM teampass_log_items as l INNER JOIN teampass_items as i ON (l.id_item=i.id) INNER JOIN teampass_users as u ON (l.id_user=u.id) INNER JOIN teampass_nested_tree as n ON (i.id_tree=n.id) WHERE i.inactif = 1 AND l.action = 'at_delete' GROUP BY l.id_item<br />Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'TeamPass.u.login' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by<br />@

**	

@nilsteampassnet
Copy link
Owner

Thank you for reporting.

Nevertheless the log you show is not related to the wrong name in the header.
Indeed this query is only performed when showing the items in the recycled bin.
This log is related to the new option only_full_group_by introduced in mysql 5.7.5.
I will correct this.

Consider the wrong name issue, can you decompose the steps you do to reproduce because I could not with your indication.

Thank you

@yasiryagi
Copy link
Author

yasiryagi commented Mar 3, 2017

The reproduce the error:
1- login as admin
2- modify the a different user property, so far I have tried change the role and unlock.

This will cause the first and the last name of the affected user to appear as the first and last name of the admin.

@yasiryagi
Copy link
Author

Correction my teampass version is 2.1.27

@nilsteampassnet
Copy link
Owner

Confirmed with your explanations.

Thank you.

Corrected.

nilsteampassnet added a commit that referenced this issue Mar 4, 2017
@yasiryagi
Copy link
Author

One last question:
To update my version for both this bug and the mysql group error what files to I need to update?

@nilsteampassnet
Copy link
Owner

The simpliest is to download the package from the "development" branch and overwrite all your local files.

Or wait for the next pre-release (on tuesday 07FEB).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants