SAML-Toolkits / wordpress-saml

OneLogin SAML plugin for Wordpress
MIT License
65 stars 74 forks source link

Fix wrong and missing late escaping. #52

Closed david-binda closed 6 years ago

david-binda commented 6 years ago

As the plugin is being used on the WordPress.com VIP platform, we have noticed some minor escaping issues while doing code review of the plugin. This commit is fixing the escaping related issues in order to make sure we don't have to patch the plugin for our clients on the platform.

In some cases, there is esc_html used for escaping HTML attribute (esc_attr should be used instead). In other cases, an escaping function is missing altogether. *Not all URLs are being properly escaped. This commit is adding esc_url everywhere, where valid URL is expected.

This PR also contains one PHPCS related comment - // Override ok. which assures PHPCS that the override of a global variable is okay.