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 validation for a few inputs (like flow and uuid) in a few spots. #548

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

bseeger
Copy link
Contributor

@bseeger bseeger commented Apr 25, 2024

Issue tracking number πŸ”—

Description of change ✍️

This adds validation of some request inputs in a few more spots. This is to ensure that "flow" and "uuid" are not used w/o validating they are legitimate data.

Priority πŸ₯‡

Effect on other applications using FFB 🌊

This should not affect any system, it will just make us a little more secure.

Testing

βœ… Checklist before requesting a review

  • [ x] Does the new code follow our preferred coding
    style
    ?
  • [x ] Does the code include javadocs, where necessary?
  • Have tests for this feature been added / updated?
  • [N/A] Has the readme been updated?

*
* @param flow {@link String} of a flow name.
* @return Returns a {@link FlowConfiguration} object.
* @throws ResponseStatusException when FlowConfigurations are not found.
Copy link
Contributor Author

@bseeger bseeger Apr 25, 2024

Choose a reason for hiding this comment

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

These are auto formatting corrections. I'm not this picky. :)

<div>
<th:block
th:replace="~{fragments/inputs/text ::
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
Copy link
Contributor Author

@bseeger bseeger Apr 26, 2024

Choose a reason for hiding this comment

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

There are no actual changes in this file, other then format ones. I can reverse this, but since we are moving to these new spacings anyways, I'll just leave this.

Map<String, Object> iteration = submission.getSubflowEntryByUuid(screen.getSubflow(), uuidToVerify);
if (iteration == null) {
throwNotFoundError(submission.getFlow(), screen.getName(),
String.format("UUID not found in iterations for subflow '%s' in flow '%s', when navigating to '%s'",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we log the UUID?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would be useful. I'll add it in.

@spokenbird spokenbird merged commit ecda742 into main Apr 26, 2024
5 checks passed
@spokenbird spokenbird deleted the fix_more_security_alerts_2 branch April 26, 2024 19:19
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.

None yet

2 participants