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

bot accounts can expire #393

Open
TurBoss opened this issue Aug 19, 2022 · 11 comments
Open

bot accounts can expire #393

TurBoss opened this issue Aug 19, 2022 · 11 comments

Comments

@TurBoss
Copy link
Member

TurBoss commented Aug 19, 2022

could this time be extended to maybe 1 year?

thanks

@abma
Copy link
Contributor

abma commented Aug 20, 2022

weird, from what i read here, bots should be kept forever:

response = self.sess().query(User).filter(User.ingame_time == 0).filter(User.last_login < now - timedelta(days=28)).filter(User.bot == 0).filter(User.access == "user")

@abma
Copy link
Contributor

abma commented Aug 20, 2022

are you sure the user account had the botflag set?

@TurBoss
Copy link
Member Author

TurBoss commented Aug 20, 2022

Hello,

this account was created with the CREATEBOTACCOUNT command

@TurBoss
Copy link
Member Author

TurBoss commented Aug 20, 2022

found this

# remove botflags from clients that didn't log in for 3 months:

abma added a commit that referenced this issue Aug 20, 2022
@abma
Copy link
Contributor

abma commented Aug 20, 2022

hm, not sure how cleanly solve this.

i guess there needs to be a "task" which checks which users are online and write this to db.

the cleanup / audit thing then should also take this into account to ignore users which where recently online.

@abma
Copy link
Contributor

abma commented Aug 20, 2022

as springrts.com server is automaticly rebooted after a (automatic) kernel update, IMHO 365 days should be enough to never be hit.

i leave this open, as there is only a workarround active

@Are-s

This comment was marked as off-topic.

@Are-s

This comment was marked as off-topic.

@silentwings
Copy link
Contributor

silentwings commented Sep 17, 2022

My dev envir is long gone, but imo the best way to fix this bug (which was my fault) would be to exclude logged in users from the effect of audit_access. Iirc can check if the user(name) is online within the for loops and continue if so.

@abma
Copy link
Contributor

abma commented Sep 19, 2022

My dev envir is long gone, but imo the best way to fix this bug (which was my fault) would be to exclude logged in users from the effect of audit_access. Iirc can check if the user(name) is online within the for loops and continue if so.

i guess thats not enough: IMHO a correct fix would be a task which is run by timer (daily) which updates last_login (or a new attribute like last_online).

i.e. think about the server going offline, server is going up again, the audit task is run. (the risk is pretty low as long as the host of uberserver is restarted because of kernel updates)

@silentwings
Copy link
Contributor

Hm, you are right

clean_loop = task.LoopingCall(_root.scheduled_clean)
will execute the looping call the first time during boot.

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

No branches or pull requests

4 participants