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

Add support for oidentd spoofing #256

Merged
merged 3 commits into from
Jun 3, 2016
Merged

Conversation

maxpoulin64
Copy link
Member

This adds support for oidentd in order for server admins to properly report who is connecting and prevent server-wide bans.

@maxpoulin64 maxpoulin64 added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Apr 16, 2016
@xPaw
Copy link
Member

xPaw commented Apr 16, 2016

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"
Copy link
Member

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"?

Copy link
Member Author

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 =/

Copy link
Member

@williamboman williamboman Apr 26, 2016

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 😃

Copy link
Member

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"

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@maxpoulin64
Copy link
Member Author

Should the identd file be cleared out or deleted when lounge is shut down?

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.

@xPaw
Copy link
Member

xPaw commented Apr 16, 2016

We should also probably have some safe guard for combining identd with oidentd options, only one should be allowed, I think.

@xPaw
Copy link
Member

xPaw commented Apr 26, 2016

👍

@maxpoulin64 maxpoulin64 force-pushed the oidentd branch 2 times, most recently from b104562 to 0330ea4 Compare April 26, 2016 20:59
@@ -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.");
Copy link
Member

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.

@maxpoulin64 maxpoulin64 force-pushed the oidentd branch 9 times, most recently from 18d4ca7 to b4875ed Compare May 2, 2016 04:46
@astorije
Copy link
Member

astorije commented May 6, 2016

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]);
}

Copy link
Member

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 🙈

@xPaw xPaw mentioned this pull request May 12, 2016
@xPaw xPaw added this to the ★ Next Release milestone May 13, 2016
@maxpoulin64
Copy link
Member Author

maxpoulin64 commented May 29, 2016

@astorije

If @YaManicKill doesn't take second review of this within a few days, I'll take a look.

Any news on this?

@AlMcKinlay
Copy link
Member

I'm not sure I understand this enough, and I certainly won't have time to look at it.

@xPaw
Copy link
Member

xPaw commented Jun 2, 2016

I guess we're fine to merge this then, since no one else wants to review it.

@astorije
Copy link
Member

astorije commented Jun 2, 2016

Any news on this?

Sorry, I completely dropped the ball on this. I'll give a review tonight or tomorrow night.

@astorije astorije self-assigned this Jun 2, 2016
@@ -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.");
Copy link
Member

@astorije astorije Jun 3, 2016

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.

@astorije
Copy link
Member

astorije commented Jun 3, 2016

I haven't run this, but went through a full tour by @maxpoulin64 and I'm good with the code: 👍

@astorije astorije merged commit 9f179c7 into thelounge:master Jun 3, 2016
@astorije
Copy link
Member

astorije commented Jun 3, 2016

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 up for grabs!).

@maxpoulin64 maxpoulin64 deleted the oidentd branch June 3, 2016 04:24
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
@xPaw xPaw unassigned astorije and xPaw Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants