bugy / script-server

Web UI for your scripts with execution management
Other
1.59k stars 247 forks source link

Clarification on --lws param #609

Closed raszuk closed 1 year ago

raszuk commented 1 year ago

I have three versions of script-server latest 1.17.1, dev and master.

First it would be cool if user/admin page would display the version.

But reason for raising this issue is to ask how to use --lws parameter to make "list with search" ... if I use it in -master as in the "Very parameterized" example it works fine, but when I try to add this to 1.17.1 the --lws parameter becomes a command line argument to the script.

All other options are identical.

Many thx, R.

bugy commented 1 year ago

Hi @raszuk, search functionality was introduced in version 1.16. It's added automatically, when there are more than 10 elements in the list. parameter name or argument (e.g. --lws name) does not affect this functionality. You can use any name.

PS you can see a version by moving mouse over Script server title on the upper left corner

raszuk commented 1 year ago

Hi,

Many thx for clarification. Indeed works as designed. This script server is simply awesome !!!

Btw I also run into issues with Trusted IPs ... what is the intention here ? To block admins from non trusted subnets/hosts or both admins and users - I would prefer the latter. What do I need to do to make the change in conf.json effective - I restarted systemd service but still see requests coming from outside of trusted range both to user and admin levels. Btw - I do hope admin_users and trusted_ips are treated as logical AND not OR.

Last (for now:) Do you have plans to add javascript output in parallel to text, terminal, html ... ? If I choose html output is there a way to force it to be launched in a different browser window ?

Many many thx, r.

On Mon, Jan 2, 2023 at 10:20 AM Iaroslav Shepilov @.***> wrote:

Hi @raszuk https://github.com/raszuk, search functionality was introduced in version 1.16. It's added automatically, when there are more than 10 elements in the list. parameter name or argument (e.g. --lws name) does not affect this functionality. You can use any name.

PS you can see a version by moving mouse over Script server title on the upper left corner

— Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/609#issuecomment-1368770652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIH6EAROYMKSXCQ4B3JMLTWQKMXJANCNFSM6AAAAAATOKE75Q . You are receiving this because you were mentioned.Message ID: @.***>

bugy commented 1 year ago

Hi @raszuk

Btw I also run into issues with Trusted IPs ... what is the intention here?

https://github.com/bugy/script-server/wiki/Authentication#ip This is used to treat user IPs as real ones and identify each user by his IP. Otherwise, if a user's IP is not trusted, he is given a unique token (stored in cookies), which identifies him. But as you mentioned, trusted IPs are not whitelist IPs, i.e. they are not used to block any connections. In this case, if this is desired behaviour, you can add the same IPs to https://github.com/bugy/script-server/wiki/Server-configuration#--allowed_users Script server does not trust any IP by default, because an attacker can easily mock any IP. And in this case he can sneak into script server with admin's IP and unlimited privileges.

Btw - I do hope admin_users and trusted_ips are treated as logical AND not OR.

admin_users and trusted_ips are used for different concepts, see the explanation above. I.e. if an admin's IP is not trusted, then you cannot make him an admin_user (unless you will use this unique token).

Do you have plans to add javascript output in parallel to text, terminal, html ... ? If I choose html output is there a way to force it to be launched in a different browser window ?

Unfortunately no plans for it, and opening it in a separate window is not implemented. The first one was never requested, the latter one was requested by one user, as far as I remember, which is not very high prio