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

#294 Check if stream length is greater than 0 to avoid processing zero byte streams #299

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

tjololo
Copy link
Member

@tjololo tjololo commented Aug 30, 2023

Description

Altinn-storage checks that files are not zero bytes. If the application receives a stream of zero bytes we know it will fail and should return an error before further processing is done

Related Issue(s)

Fixes #294

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@tjololo tjololo added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Aug 30, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@tjololo tjololo requested a review from RonnyB71 August 30, 2023 08:52
Copy link
Member

@RonnyB71 RonnyB71 left a comment

Choose a reason for hiding this comment

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

🕹️

@tjololo tjololo changed the title Check if stream length is greater than 0 to avoid processing zero byte streams #294 Check if stream length is greater than 0 to avoid processing zero byte streams Sep 5, 2023
@tjololo tjololo merged commit b5f5fd2 into main Sep 5, 2023
10 checks passed
@tjololo tjololo deleted the bugfix/check-that-attachments-has-bytes branch September 5, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Label Pull requests with bugfix. Used when generation releasenotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create data in DataController should verify that stream is not empty
2 participants