Skip to content

fix unclosed IO resources, unify notebot folder creation#6435

Open
MukjepScarlet wants to merge 2 commits into
MeteorDevelopment:masterfrom
MukjepScarlet:fix-unclosed-io-resource
Open

fix unclosed IO resources, unify notebot folder creation#6435
MukjepScarlet wants to merge 2 commits into
MeteorDevelopment:masterfrom
MukjepScarlet:fix-unclosed-io-resource

Conversation

@MukjepScarlet
Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature

Description

A summary of the changes along with the reasoning behind the changes.

Related issues

Nothing I guess

How Has This Been Tested?

Local env (development)

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

final String text = reader.getRemaining();
reader.setCursor(reader.getTotalLength());
return MeteorClient.FOLDER.toPath().resolve("notebot/" + text);
return Notebot.PATH.toPath().resolve(text);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would be a good idea to throw a CommandSyntaxException on path traversal here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

e.g. text contains ..?

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