Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Add validation for doc ID and attachment names#529

Merged
ricellis merged 1 commit intomasterfrom
validation-feature
Aug 26, 2021
Merged

Add validation for doc ID and attachment names#529
ricellis merged 1 commit intomasterfrom
validation-feature

Conversation

@ricellis
Copy link
Copy Markdown
Member

Checklist

  • Tick to sign-off your agreement to the Developer Certificate of Origin (DCO) 1.1
  • Added tests for code changes or test/build only changes
  • Updated the change log file (CHANGES.md|CHANGELOG.md) or test/build only changes
  • Completed the PR template below:

Description

Add validation for doc ID and attachment names

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

Use an invalid document ID or attachment name.

2. What you expected to happen

The request to fail.

3. What actually happened

The request is passed to the server.

Approach

Add validation to functions that access document IDs or attachments to prevent clash with system paths.

Schema & API Changes

  • Additional places where IllegalArgumentException is thrown.

Security and Privacy

  • Enhances security by providing a fallback in the event consuming applicaitons to not sanitize user input.

Testing

  • Added new tests for many doc ID and attachment name validation scenarios.

Monitoring and Logging

  • "No change"

@ricellis ricellis added this to the 2.19.3 milestone Aug 26, 2021
@ricellis ricellis self-assigned this Aug 26, 2021
@ricellis ricellis merged commit cedd243 into master Aug 26, 2021
@ricellis ricellis deleted the validation-feature branch August 26, 2021 09:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants