Is it possible to sanitizing/whitelist a byte array in Java?

Fortify security program is detecting a XSS (persistent) vulnerability within an api that returns a byte[ ] (an image).

Is it possible to sanitize a byte array?

For example, can I check each byte in the array and make sure it’s within some set of byte values? (Assuming an image is translated using only a set of byte values)

submitted by /u/GuerroCanelo
[link] [comments]

from hacking: security in practice https://ift.tt/QdDxPph

Comments