SshResourceForm: fix XSS by escaping user-defined resource name
in the tooltip of the message shown instead of the private key.
This commit is contained in:
parent
bdb9fd299b
commit
a3100d378b
|
@ -87,9 +87,9 @@ class SshResourceForm extends Form
|
||||||
'value' => sprintf(
|
'value' => sprintf(
|
||||||
'<a href="%1$s" data-base-target="_next" title="%2$s" aria-label="%2$s">%3$s</a>',
|
'<a href="%1$s" data-base-target="_next" title="%2$s" aria-label="%2$s">%3$s</a>',
|
||||||
$this->getView()->url('config/removeresource', array('resource' => $resourceName)),
|
$this->getView()->url('config/removeresource', array('resource' => $resourceName)),
|
||||||
sprintf($this->translate(
|
$this->getView()->escape(sprintf($this->translate(
|
||||||
'Remove the %s resource'
|
'Remove the %s resource'
|
||||||
), $resourceName),
|
), $resourceName)),
|
||||||
$this->translate('To modify the private key you must recreate this resource.')
|
$this->translate('To modify the private key you must recreate this resource.')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue