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

Add validation for doc ID and attachment names #460

Merged
merged 1 commit into from
Aug 26, 2021
Merged

Conversation

ricellis
Copy link
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

  • Behaviour change, errors thrown before server request.

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 4.next milestone Aug 26, 2021
@ricellis ricellis merged commit 8417bf5 into master Aug 26, 2021
@ricellis ricellis deleted the validation-feature branch August 26, 2021 09:22
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.

4 participants