I am currently filtering a list of documents according to a certain criteria.
Then I present this list to the user and I have a
<p:commandButton action="#{controllerBean.downloadDocument(document.id)}" ajax="false" />
Looking at the rendered code, I don't see the document id anywhere but that doesn't mean it is somehow encoded and can be decoded, changed and reencoded from the client.
My understanding of JSF state handling is quite weak but, correct me if I am wrong: manually changing the value of an action parameter value is not possible from the client because, even when stored on the client, only the server can decode and encode session states, and the parameter values are stored there. Am I right or should I add a check to downloadDocument(document.id)
to make sure the user has permission to download that particular document.id
? I will add this check in the future no matter what but I want to know how critical this issue is right now.