-
Notifications
You must be signed in to change notification settings - Fork 21
Update v3 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update v3 #128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of review - added a few comments/questions.
esc_attr(trim($options['server_side_access_token'])) : | ||
'', | ||
'client_side_access_token' => (!empty($options['client_side_access_token'])) ? | ||
trim($options['client_side_access_token']) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing esc_attr
here?
|
||
// Don't store default values in the database, so future updates to default values in the SDK get propagated. | ||
foreach ($settings as $setting_name => $setting_value) { | ||
if ($setting_value == Plugin::getInstance()->settingsInstance()->getDefaultOption($setting_name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ===
?
name="<?= esc_attr($input->getName()) ?>" | ||
id="<?= esc_attr($input->getId()) ?>" | ||
data-setting="<?= esc_attr($input->getId()) ?>" | ||
value="<?= $input->getValue() ?>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing esc_attr
?
name="<?= esc_attr($input->getName()) ?>" | ||
id="<?= esc_attr($input->getId()) ?>" | ||
data-setting="<?= esc_attr($input->getId()) ?>" | ||
value="<?= $input->getValue() ?>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing esc_attr
?
?> | ||
<hr> | ||
<div class="rollbar-settings-section-header"> | ||
<h2 id="<?= $id ?>" class="section-heading"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escaping needed in this file?
echo 'foo'; | ||
foreach ($messages as $message) : ?> | ||
<div class="notice notice-<?= $message['type'] ?> is-dismissible"> | ||
<p><?= $message['message'] ?></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escaping needed in this file?
} catch (Exception $exception) { | ||
FlashMessages::addMessage( | ||
message: 'Rollbar is misconfigured. Please, fix your configuration here: <a href="' | ||
. admin_url('/options-general.php?page=rollbar_wp') . '">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This <a>
tag looks incomplete?
`<p><strong>PHP Test:</strong> There was a problem accessing Rollbar service.</p> | ||
<ul> | ||
<li>Code:<code>${data.code}</code></li> | ||
<li>Message:<code>${data.message}</code></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escape the data coming from the api?
* }[] $messages | ||
*/ | ||
|
||
echo 'foo'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug print
Just a heads up: perhaps you can take a look at the implementation / fix for the security issue in #129. It also has a nice markdown file with security advises |
Description of the change
This is a major update the WordPress plugin. It includes an overhaul of most everything. Here is a high level list of everything that changed.
ROLLBAR_DISABLE_ADMIN
to remove the plugin settings page from the admin.ROLLBAR_SETTINGS
to configure the plugin without the admin page.ROLLBAR_CLIENT_ACCESS_TOKEN
constant or environment variable to set the client access token.WP_PROXY_BYPASS_HOSTS
,WP_PROXY_USERNAME
, andWP_PROXY_PASSWORD
for better proxy management.rollbar_api_admin_permission
filter to allow custom authorization of the admin API.rollbar_disable_admin
filter to allow custom disabling of the admin page.rollbar_php_config
filter to allow more exact control over Rollbar PHP configurations.rollbar_telemetry_actions
filter to allow control of which actions are logged via telemetry.rollbar_telemetry_custom_handlers
filter to allow custom control over what is logged in telemetry messages.Type of change
Related issues
Checklists
Development
Code review