-
Notifications
You must be signed in to change notification settings - Fork 703
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
Add support for oidentd spoofing #256
Conversation
Should the identd file be cleared out or deleted when lounge is shut down? |
// | ||
// Enable oidentd support using the specified file | ||
// | ||
// Example: oidentd: (process.env.HOME || process.env.USERPROFILE) + "/.oidentd.conf" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it explode if you use "~/.oidentd.conf"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, unfortunately. I don't know if there's a way to have it expand that properly =/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trigger warning
Well of course https://github.com/sindresorhus/untildify 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that it's fixed, we can have the example say oidentd: "~/.oidentd.conf"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
That would be the cleaner option, but I don't know if we have a somewhat decent way to know we're exiting. Technically if the client disconnected all networks properly, the file would be emptied as it deletes obsolete lines. It shouldn't have a negative side-effect unless someone runs another IRC client as the same user as The Lounge ran, connect to the same network and have the bad luck of reusing the same source port. |
We should also probably have some safe guard for combining identd with oidentd options, only one should be allowed, I think. |
👍 |
b104562
to
0330ea4
Compare
@@ -39,6 +40,10 @@ module.exports = function(options) { | |||
} | |||
|
|||
if ((config.identd || {}).enable) { | |||
if (manager.identHandler) { | |||
console.warn("Warning: using both identd and oidentd at the same time."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to log.warn
which is now in master.
18d4ca7
to
b4875ed
Compare
If @YaManicKill doesn't take second review of this within a few days, I'll take a look. |
@@ -46,3 +51,4 @@ function parse(data) { | |||
data = data.split(","); | |||
return parseInt(data[0]) + ", " + parseInt(data[1]); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of this empty line when you rebase 🙈
Any news on this? |
I'm not sure I understand this enough, and I certainly won't have time to look at it. |
I guess we're fine to merge this then, since no one else wants to review it. |
Sorry, I completely dropped the ball on this. I'll give a review tonight or tomorrow night. |
@@ -40,6 +41,10 @@ module.exports = function(options) { | |||
} | |||
|
|||
if ((config.identd || {}).enable) { | |||
if (manager.identHandler) { | |||
log.warn("Warning: using both identd and oidentd at the same time."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to specify Warning:
if this is already a log.warn
? Also, considering the content, I'd go for an info rather than a warning: https://github.com/thelounge/lounge/blob/2e967e83753f6eda2534adb1e590776a74b0f5c5/src/log.js#L25-L27.
I haven't run this, but went through a full tour by @maxpoulin64 and I'm good with the code: 👍 |
Now, @maxpoulin64, do you think this should be reflected in the doc somewhere: https://thelounge.github.io/docs/server/configuration.html ? Of course, the docs really need some love, but I'm talking short term rather than a bigger-commitment doc refactor unicorn :-) (smells like |
Add support for oidentd spoofing
This adds support for oidentd in order for server admins to properly report who is connecting and prevent server-wide bans.