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 -lh flag / LocalhostOnly property to just bind to the local loopback interface #1183

Merged
merged 7 commits into from Feb 16, 2019

Conversation

Projects
None yet
2 participants
@tcnh
Copy link
Contributor

commented Feb 8, 2019

Added -lh flag / LocalhostOnly property to just bind to the local loopback interface.
Effectively preventing wiki-access from other machines in the newtork.

Should address #1141

Note: I am unable to test this change with SSL enabled

tcnh added some commits Feb 8, 2019

Added -lh flag / LocalhostOnly property to just bind to the local loo…
…pback interface. Effectively preventing wiki-access from other machines in the newtork.

Should address #1141
Note: I am unable to test this change with SSL enabled
@fhoeben
Copy link
Collaborator

left a comment

Looks quite good.
Any chance you can add a unit test to ensure that (at least from localhost) one can connect to the server in localhost-only mode. (I don't expect we can make a unit test to ensure connections from remote hosts are impossible)

Update FitNesseRoot/FitNesse/UserGuide/AdministeringFitNesse/CommandL…
…ineArguments/content.txt

Co-Authored-By: tcnh <tom.heintzberger@gmail.com>
@fhoeben

This comment has been minimized.

Copy link
Collaborator

commented Feb 16, 2019

Do you think you will be able to add a unit test showing a connection from localhost when the flag is set?

@tcnh

This comment has been minimized.

Copy link
Contributor Author

commented Feb 16, 2019

Yes, I created one yesterday. I hope to find the time to polish and push it today

}
}

@Test
public void localhostOnlyFlagResultsInConnectableFitnesseOnLocalHost() throws Exception {

This comment has been minimized.

Copy link
@fhoeben

fhoeben Feb 16, 2019

Collaborator

Locally, a ./gradlew test now fails on many tests. Does it work for you?

I believe this test keeps a server running. Is that indeed the case? If so, please ensure it is cleaned up after the test completes...

This comment has been minimized.

Copy link
@tcnh

tcnh Feb 16, 2019

Author Contributor

I have no failing tests... May be OS dependent.
Let me see if I can force close the Fitnesse process

This comment has been minimized.

Copy link
@fhoeben

fhoeben Feb 16, 2019

Collaborator

The Shutdown class will do it.
If I add a call to that (in a finally block) all tests pass...

This comment has been minimized.

Copy link
@fhoeben

fhoeben Feb 16, 2019

Collaborator

Since I actually have the code available, let me just push it.

This comment has been minimized.

Copy link
@tcnh

tcnh Feb 16, 2019

Author Contributor

Changed the test to call the shutdown responder. Could you verify if that prevents the other tests from failing?

This comment has been minimized.

Copy link
@fhoeben

fhoeben Feb 16, 2019

Collaborator

You were faster than I expected. Testing now....

@fhoeben fhoeben merged commit 63b3e31 into unclebob:master Feb 16, 2019

@tcnh tcnh deleted the tcnh:localhost-only-flag branch Feb 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.