[GH-ISSUE #9] Improvement: Presently storing IP as string. Find and implement a better way. #4

Closed
opened 2026-02-27 15:38:56 +03:00 by kerem · 5 comments
Owner

Originally created by @nishchayp on GitHub (Dec 3, 2017).
Original GitHub issue: https://github.com/nishchayp/DAMN/issues/9

Originally created by @nishchayp on GitHub (Dec 3, 2017). Original GitHub issue: https://github.com/nishchayp/DAMN/issues/9
kerem closed this issue 2026-02-27 15:38:56 +03:00
Author
Owner

@ekamwalia commented on GitHub (Dec 9, 2017):

Isn't storing the IP as a string the most convenient way to store it given we can the easily pass it to the copy and remove scripts?

That is anyway all we need to do with the IP address

<!-- gh-comment-id:350430887 --> @ekamwalia commented on GitHub (Dec 9, 2017): Isn't storing the IP as a string the most convenient way to store it given we can the easily pass it to the copy and remove scripts? That is anyway all we need to do with the IP address
Author
Owner

@nishchayp commented on GitHub (Dec 9, 2017):

The only problem I see here is error made by admin while entering the IP address but yes that could be handled by js form validation. Actually there were a few threads on SO about storing IP in a DB that is why I felt the need for this improvement. Let's just check it once if there are any major drawback of storing as string. If there are none then we can close this issue.

<!-- gh-comment-id:350432029 --> @nishchayp commented on GitHub (Dec 9, 2017): The only problem I see here is error made by admin while entering the IP address but yes that could be handled by js form validation. Actually there were a few threads on SO about storing IP in a DB that is why I felt the need for this improvement. Let's just check it once if there are any major drawback of storing as string. If there are none then we can close this issue.
Author
Owner

@ekamwalia commented on GitHub (Dec 9, 2017):

I agree to the mistake while storing part. But the validation is easy.

There are some IP types in the go net package. We can look into that , and if these provide a specfic advantage, we can shift to those.

<!-- gh-comment-id:350432334 --> @ekamwalia commented on GitHub (Dec 9, 2017): I agree to the mistake while storing part. But the validation is easy. There are some IP types in the go net package. We can look into that , and if these provide a specfic advantage, we can shift to those.
Author
Owner

@pranavtharoor commented on GitHub (Dec 13, 2017):

Are we also saving domain names? Currently it supports domains. If we change to non-string, then it won't support domains.

<!-- gh-comment-id:351528937 --> @pranavtharoor commented on GitHub (Dec 13, 2017): Are we also saving domain names? Currently it supports domains. If we change to non-string, then it won't support domains.
Author
Owner

@nishchayp commented on GitHub (Dec 15, 2017):

Storing as string with front-end form validation seems fine.

<!-- gh-comment-id:351990972 --> @nishchayp commented on GitHub (Dec 15, 2017): Storing as string with front-end form validation seems fine.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DAMN#4
No description provided.