department-of-veterans-affairs / va-mobile-app

"If VA were a company, it would have a flagship mobile app."
https://department-of-veterans-affairs.github.io/va-mobile-app/
12 stars 2 forks source link

Guard against nameless files on message file attachments #9018

Open aherzberg opened 2 months ago

aherzberg commented 2 months ago

There are some infrequent errors that MHV says is caused by messages being received with files attached with no names. This only happens ~.02% of the time. FE may need some additional file validation to ensure files attached have names.

See slack convo for reference: https://dsva.slack.com/archives/C05TU9FPZU0/p1720551615312799?thread_ts=1720459064.552039&cid=C05TU9FPZU0

related error ticket: https://app.zenhub.com/workspaces/va-mobile-60f1a34998bc75000f2a489f/issues/gh/department-of-veterans-affairs/va-mobile-app/8472

bischoffa commented 1 month ago

@DJUltraTom can you scrub this bug? Given no team this falls under the floater

DJUltraTom commented 1 month ago

@aherzberg what steps would you suggest QA take for validating this ?

aherzberg commented 1 month ago

I would try something like this: https://indianexpress.com/article/technology/techook/how-to-create-a-blank-folder-on-windows-to-store-private-files-8350098/. or using some other unicode value that doesn't show up as a valid character in operating systems. Unfortunately I don't know the exact way this error forms as we only have the error response but if something like the link above doesn't work then it may be worth checking the FE code to see if there's any existing guard against a valid name beyond just valid extensions.

Sparowhawk commented 1 week ago

@wavelaurenrussell a potential solution here is adding the ability to edit/display a file name for the veteran and displaying it for them to see with the image previewer that I added to claims

Sparowhawk commented 4 days ago

We just supply whatever the phones file system sends us since we send these to the native controller. So it has to have some sort of name associated with it in the system. So this tells me it is an invalid character causing the issue. Unfortunately without knowing the character causing the issue I don't know what can be done.

@aherzberg do we know if this was occuring on Android or iOS? That may narrow down some possible characters.