Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><em>Which properties in a JSF backing bean can be set by a user?</em></p> </blockquote> <p>Those bound to an <a href="http://docs.oracle.com/javaee/6/api/javax/faces/component/EditableValueHolder.html" rel="nofollow noreferrer"><code>EditableValueHolder</code></a> component, such as <a href="http://docs.oracle.com/javaee/6/api/javax/faces/component/UIInput.html" rel="nofollow noreferrer"><code>UIInput</code></a> and friends (including <code>&lt;f:viewParam&gt;</code>!), with the precondition that they are <code>rendered="true"</code>, <code>disabled="false"</code> and <code>readonly="false"</code> during apply request values phase.</p> <p>Another possible way is through a <code>@ManagedProperty("#{param.xxx}")</code> on the property of a request scoped bean or a hardcoded <code>ExternalContext#getRequestParameterMap()</code> access in some bean method which is invoked during the HTTP request.</p> <p>So, <strong>only</strong> when you as being the developer explicitly bind the property to an editable value holder component which is rendered, non-disabled/readonly, or when you as being the developer explicitly set a request parameter as a property. There are in the current releases of JSF implementations absolutely no security holes with reagard to the possibility of setting undeclared/unbound properties by HTTP means. It's even not possible to send an arbitrary value to a <code>UISelectOne</code> or <code>UISelectMany</code> component by spoofing the HTTP request, it would only end up in <a href="https://stackoverflow.com/questions/9069379/validation-error-value-is-not-valid/9069660#9069660">"Validation Error: Value is not valid"</a>.</p> <hr> <p>As to security holes in older JSF implementations, only and only when you're navigating to a different view using <code>includeViewParams="true"</code> in a Mojarra version older than 2.0.7 and 2.1.5, then all EL expressions in view params such as <code>#{bean.setArbitraryProperty('foo')}</code> will be evaluated. See also <a href="https://java.net/jira/browse/JAVASERVERFACES-2247" rel="nofollow noreferrer">issue 2247</a>. I'm not aware of any security holes in MyFaces; that's not because there are none per se, but simply because I don't use/track it closely.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload