Page 1 of 1

Add user_agent (or other device info) to session keys table

Posted: Wed Jun 17, 2020 10:22 am
by Siava
In UCP session keys tab have many trash keys with same IP.
Perhaps adding a new field to the table would help to better understand them.

It very simple to realise.

Re: Add user_agent (or other device info) to session keys table

Posted: Wed Jun 17, 2020 7:38 pm
by Brf
You mean like the existing session_browser column?

Re: Add user_agent (or other device info) to session keys table

Posted: Thu Jun 18, 2020 10:14 am
by Siava
I mean Manage “Remember Me” login keys in UCP.
For example: ucp.php?i=ucp_profile&mode=autologin_keys

If you have a lot of information about login keys there, it is not clear which key belongs to which device.

Re: Add user_agent (or other device info) to session keys table

Posted: Thu Jun 18, 2020 10:29 am
by warmweer
But what is there more to understand?
If browser agent is just informative then what's its use when a member logs in o, with another device (I log in with tablet, home PC, another PC and I've even tested smartphone).
BTW user agents can be spoofed easily (that 's what bots do all the time).

Re: Add user_agent (or other device info) to session keys table

Posted: Thu Jun 18, 2020 11:10 am
by Siava
How to understand what to remove and what to leave?
What else is valid and what can be removed?
Where is the PC, notebook, smartphone/tab session key?

Re: Add user_agent (or other device info) to session keys table

Posted: Thu Jun 18, 2020 4:10 pm
by Lumpy Burgertushie
why do you want to remove any of them or only certain ones? If I was concerned about disk space or whatever, I would remove them all.

also, where do you see this form that you posted the screen shot for?


I don't find it in the admin panel unless I missed it somewhere.


rob ert

Re: Add user_agent (or other device info) to session keys table

Posted: Thu Jun 18, 2020 7:25 pm
by Dr.Death
Lumpy Burgertushie wrote:
Thu Jun 18, 2020 4:10 pm
also, where do you see this form that you posted the screen shot for?
  • UCP -->
  • Profile -->
  • Manage “Remember Me” login key
So, it would be helpfull to see on this page, what device / browser was used.
Voted with : Yes.

Re: Add user_agent (or other device info) to session keys table

Posted: Fri Jun 19, 2020 6:01 am
by rxu
UCP wrote:Here you can see remember login keys created on other computers you used to access this site.
Sounds logically. Currently you have actually no real info about keys to decide what keys to delete. Key hash, IP address and login time say nothing about what 'computer' login key was created on.

For the reference: https://github.com/WhichBrowser/Parser-PHP

Re: Add user_agent (or other device info) to session keys table

Posted: Fri Jun 19, 2020 10:34 am
by AmigoJack
Dr.Death wrote:
Thu Jun 18, 2020 7:25 pm
  • UCP -->
  • Profile -->
  • Manage “Remember Me” login key
To use one key feature of the internet I'll just link to that site. For me this page lists only one single key, not dozens.

Re: Add user_agent (or other device info) to session keys table

Posted: Fri Jun 19, 2020 11:33 am
by Dr.Death
It depends on your usage and on different connections / devices you use.

Re: Add user_agent (or other device info) to session keys table

Posted: Mon Jun 22, 2020 9:29 am
by Siava
It will be look like this:

Image

Re: Add user_agent (or other device info) to session keys table

Posted: Mon Jun 22, 2020 5:37 pm
by 3Di
This required just a bunch of lines of code and a new migration which adds a new field in the session_keys table.
2020-06-22 19_34_05-vblog - User Control Panel - Manage “Remember Me” login keys.png
Having read the rxu's new PR though I do not know if making a PR for this will be accepted.
https://github.com/phpbb/phpbb/pull/6012
It can be done via extensions once merged.

Re: Add user_agent (or other device info) to session keys table

Posted: Mon Jun 22, 2020 8:16 pm
by Siava
3Di wrote:
Mon Jun 22, 2020 5:37 pm
It can be done via extensions once merged.
I already wrote an extension :) You can test it.

Minimum phpbb version required: 3.3.2.
Device info in Session keys

Important!
Before install on phpbb 3.3.0/3.3.1 apply this: https://github.com/phpbb/phpbb/pull/6012
And change in ext.php minimum version from 3.3.2 to 3.3.0.