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

Added support for storing IP addresses at login #197

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

Bakk-f4
Copy link
Contributor

@Bakk-f4 Bakk-f4 commented May 11, 2023

IP addresses are now being logged to database and associated to each account is logged.
This Issue #128 should be resolved now

@Bakk-f4 Bakk-f4 changed the title Resolving Issue #128 Added support for storing IP addresses at login May 12, 2023
dndserver/handlers/login.py Outdated Show resolved Hide resolved
dndserver/protocol.py Outdated Show resolved Hide resolved
@@ -27,6 +27,18 @@ def save(self):
db.commit()


class IPAddress(base):
__tablename__ = "ip_addresses"
Copy link
Owner

@Snaacky Snaacky May 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table name should be something more along the lines of user_logins or something of that nature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the login table in PR #186. Let me know which names you prefer for what

id = Column(Integer, primary_key=True, autoincrement=True)
address = Column(String(45), nullable=False)
account_id = Column(Integer, nullable=True)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not storing the seen_at time that the logins are occurring which makes the logs less useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are storing the time already in another table in PR #186, let me know if you want aswell another timestamp in this table too. I tought it was not usefull to store two times the same info, we can just join the two tables and we get the same result

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

Successfully merging this pull request may close these issues.

2 participants