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

Protect remote rules from unwanted traffic #10640

Conversation

SteVio89
Copy link
Collaborator

@SteVio89 SteVio89 commented Jun 5, 2024

No description provided.

@SteVio89 SteVio89 requested a review from fabrichter June 5, 2024 15:28
Copy link
Collaborator

@fabrichter fabrichter left a comment

Choose a reason for hiding this comment

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

There's a println statement that should be removed; if needed, you can log the information there as part of the existing request logs.

You can look into making the tests actually runnable for other people and as part of CI, by using the TestRemoteRule which is added like this in org.languagetool.Language#getRelevantRemoteRules when an ID starts with TEST

      .filter(config -> config.getRuleId().startsWith("TEST"))
      .map(c -> new TestRemoteRule(this, c))
      .forEach(rules::add);

Instead of local files for server.properties and remote-rule.json, you can generate temporary files as part of the setup for the test suite with the required content and use those files when setting up the server.

@SteVio89 SteVio89 requested a review from fabrichter July 8, 2024 19:52
@SteVio89 SteVio89 merged commit 092ff53 into languagetool-org:master Jul 10, 2024
3 checks passed
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