Zimbra-Community / account-history

A Zimbra extension that allows the user to monitor their recent login and account activity. This is important to keep the user's account safe.
GNU General Public License v2.0
21 stars 2 forks source link

Suggestions for improvement #8

Closed sempiterna closed 6 years ago

sempiterna commented 7 years ago

This is a suggestion for improvement:

The bing maps issue I reported earlier seems to have resolved itself after I updated zimbra to 8.7.11.

barrydegraaff commented 7 years ago

@sempiterna I added support for reading gz files, for now, it will only read yesterdays gz.

Later I will make the number of gz files to read configurable, but I want to test this first. And see what the performance is.

barrydegraaff commented 7 years ago

re-run the installer and configure see: https://github.com/Zimbra-Community/account-history#configuring-preferences

barrydegraaff commented 6 years ago

The latest version will show the last log per ip/protocol/device. So that should be more relevant.

In addition the entire log line is shown under details for the user. That way you could see if a login was failed or not.

sempiterna commented 6 years ago

Thanks for making the improvements. Unfortunately it's not working properly.

In firefox, when simply clicking once on "Account History", nothing happens, but in firebug I see:

"TypeError: this.sorttable_tbody is undefined[Meer info] sorttable.js:146:10"

When you then rightclick on Account History and select 'full log', I see a very long list of log entries that run off screen.

When reloading the page, and then directly rightclick and select 'full log', it shows the window correctly.

When you then close the Account History window and then doubleclick on Account History, the TypeError is shown again, only now I see a window but with only one row and nothing else.

In chrome, clicking once on Account History shows the window, with no pagination. Developer tools shows:

Uncaught TypeError: Cannot read property 'rows' of undefined at HTMLTableCellElement.sorttable.innerSortFunction (sorttable.js?v=170531144835&language=en&country=US&debug=1:146) at Function.historyZimlet.displayDialog (tk_barrydegraaff_account_history.js?v=170531144835&language=en&country=US&debug=1:273) at Function.run ((index):1421) at ZmRequestMgr._handleResponseSendRequest (Startup1_2_all.js.zgz?v=170531144835:20421) at AjxCallback.run ((index):1481) at ZmCsfeCommand._runCallback (Startup1_1_all.js.zgz?v=170531144835:27973) at AjxCallback.run ((index):1481) at Function.AjxRpcRequest.handleResponse (Startup1_1_all.js.zgz?v=170531144835:1352) at XMLHttpRequest.httpReq.onreadystatechange (Startup1_1_all.js.zgz?v=170531144835:1296)

Full Log shows the same as in firefox.. a continuous amount of loglines running off the screen.

Selecting Full Log right from the start works though.

You may probably want to remove the click/double click on Account History in favour of the rightclick full log option. Since that part works.

barrydegraaff commented 6 years ago

Yeah I have seen this issue as well, its because not all javascript is loaded before the user clicks.

For now, reload zimbra, wait 10 seconds and try again. I will later next week

On 18 Nov 2017, at 21:53, Jeroen Wierda notifications@github.com wrote:

Thanks for making the improvements. Unfortunately it's not working properly.

In firefox, when simply clicking once on "Account History", nothing happens, but in firebug I see:

"TypeError: this.sorttable_tbody is undefined[Meer info] sorttable.js:146:10"

When you then rightclick on Account History and select 'full log', I see a very long list of log entries that run off screen.

When reloading the page, and then directly rightclick and select 'full log', it shows the window correctly.

When you then close the Account History window and then doubleclick on Account History, the TypeError is shown again, only now I see a window but with only one row and nothing else.

In chrome, clicking once on Account History shows the window, with no pagination. Developer tools shows:

Uncaught TypeError: Cannot read property 'rows' of undefined at HTMLTableCellElement.sorttable.innerSortFunction (sorttable.js?v=170531144835&language=en&country=US&debug=1:146) at Function.historyZimlet.displayDialog (tk_barrydegraaff_account_history.js?v=170531144835&language=en&country=US&debug=1:273) at Function.run ((index):1421) at ZmRequestMgr._handleResponseSendRequest (Startup1_2_all.js.zgz?v=170531144835:20421) at AjxCallback.run ((index):1481) at ZmCsfeCommand._runCallback (Startup1_1_all.js.zgz?v=170531144835:27973) at AjxCallback.run ((index):1481) at Function.AjxRpcRequest.handleResponse (Startup1_1_all.js.zgz?v=170531144835:1352) at XMLHttpRequest.httpReq.onreadystatechange (Startup1_1_all.js.zgz?v=170531144835:1296)

Full Log shows the same as in firefox.. a continuous amount of loglines running off the screen.

Selecting Full Log right from the start works though.

You may probably want to remove the click/double click on Account History in favour of the rightclick full log option. Since that part works.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

sempiterna commented 6 years ago

Unfortunately even waiting a minute does not make it work (neither in firefox nor chrome).

barrydegraaff commented 6 years ago

please re-run the installer, flush browser cache and server cache.

if it still does not work, restart mailbox.

Kind regards,

Barry de Graaff Zeta Alliance Founder zetalliance.org | github.com/Zimbra-Community

+31 617 220 227 Fingerprint: 97f4694a1d9aedad012533db725ddd156d36a2d0

From: "Jeroen Wierda" notifications@github.com To: "Zimbra-Community/account-history" account-history@noreply.github.com Cc: "Barry de Graaff" info@barrydegraaff.tk, "State change" state_change@noreply.github.com Sent: Saturday, November 18, 2017 10:06:08 PM Subject: Re: [Zimbra-Community/account-history] Suggestions for improvement (#8)

Unfortunately even waiting a minute does not make it work (neither in firefox nor chrome).

— You are receiving this because you modified the open/close state. Reply to this email directly, [ https://github.com/Zimbra-Community/account-history/issues/8#issuecomment-345471174 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AEJsvRyfTneQfbkWnyNTv7q77uQ46AFKks5s30a-gaJpZM4PR766 | mute the thread ] .

sempiterna commented 6 years ago

That works :) However, now clicking on Account History only produces a small result set, while right mouseclick Full Log produces pagination. I'm not sure if that is the intended behaviour.

Also, would it be much additional work to add a column to show if the login was invalid? For example perform a check on "authentication failed" or "invalid password", since you are grabbing the line from the log anyway. The column would maybe have a header "Valid" and all valid logins have an x, and invalid have an - .

barrydegraaff commented 6 years ago

yeah, I am working around limitations in Zimbra here.

The full log is too much for most users, and they idea is to give insight in if your account is compromised, that should show in the short-list in most cases.

You can use the Full-log if you want to dig through the details.

Wrong log-ins you can see that under Details, it's not too friendly, but its there.