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

VEDUHSF Fixes -Research & remediate MimeType validation failure #81480

Open
freeheeling opened this issue Apr 23, 2024 · 0 comments
Open

VEDUHSF Fixes -Research & remediate MimeType validation failure #81480

freeheeling opened this issue Apr 23, 2024 · 0 comments
Labels
code-yellow Related to an ongoing Code Yellow issue DBEX-Carbs Disability Benefits Experience - Team Carbs disability-experience

Comments

@freeheeling
Copy link
Contributor

freeheeling commented Apr 23, 2024

Review and identify cause of Sidekiq job exhaustions related to EVSS_15005 - MimeType validation failures. Can any validation improvements be made to prevent or limit the occurrence of document uploads failing downstream acceptance, given the following details from earlier research?

EVSS validation check for doc upload:

  • EVSS_15005: uploaded files's actual MimeType does not equal the implied File name based on the extension of the file

from https://dsva.slack.com/archives/C1VBAHWQL/p1537980384000100:

On uploads of attachments to wss-document-services, one of the validations the service performs is to sanity check the given file extension (e.g., “.pdf”) to the “detected” mime type of the file itself. If there’s a mismatch, the service will return the EVSS_15005. So chances are the service was not able to recognize the upload as a valid pdf file.
It seems that when document-services analyzes the actual content of a problematic attachment, it’s determining the attachment to be a “plain/text” file. and with the file extension being a .pdf is why document-services is returning the 15005

Primary path validations

  • EVSSClaimDocumentUploaderBase, LighthouseDocumentUploaderBase (currently only called from ClaimsAndAppeals and BenefitsDocuments controllers
    • each ensures file extension matches mime type, and attempt to fix the file extension (however, it does not appear an error is returned if conversion is unsuccessful or if the new fixed extension is a disallowed type)

FE UI validations

  • file extension matches file type
    • Updates in PR #19509 check an uploaded file's extension against the file (mime) type and then searches the file content for a matching format signature. An error is returned if there is a mismatch.
    • image
@freeheeling freeheeling added the DBEX-Carbs Disability Benefits Experience - Team Carbs label Apr 23, 2024
@lisacapaccioli lisacapaccioli added the code-yellow Related to an ongoing Code Yellow issue label Aug 23, 2024
@lisacapaccioli lisacapaccioli changed the title Research & remediate MimeType validation failure VEDUHSF Fixes -Research & remediate MimeType validation failure Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-yellow Related to an ongoing Code Yellow issue DBEX-Carbs Disability Benefits Experience - Team Carbs disability-experience
Projects
None yet
Development

No branches or pull requests

3 participants