buddywhatshisname
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Updates Manager] Work on load-balanced servers?Testing this, it only updates one of the load-balanced servers leaving us with mixed versions – yikes! Any fix possible, e.g. wp-cli trigger an update?
Thanks Alimir
Forum: Themes and Templates
In reply to: [Hueman] 3.6.7 update?Looks like it’s updated to 3.6.7 now 🙂
Forum: Plugins
In reply to: [Lord of the Files: Enhanced Upload Security] PHP7.0 compatibilityGreat thanks – that explains why I couldn’t find it in the code 🙂 I’ll do compatibility checks on future versions and build some functional tests. I’ll also get the ball rolling on updating our PHP — I do appreciate the early warning.
Forum: Plugins
In reply to: [WP Cassify] Multivalued attributes and authorization rulesActually nvm I figure it out looking at the code — the -IN condition checks for an exact match in that particular CAS attribute’s array of values, so
(CAS{eduPersonAffiliation} -IN “employee”)
will not match the <cas:eduPersonAffiliation>former_employee</cas:eduPersonAffiliation>valueForum: Plugins
In reply to: [WP Cassify] Multivalued attributes and authorization rulesHi – can you please clarify the docs
https://wpcassify.wordpress.com/wp-cassify-plugin-documentation/
regarding multi-value attributes?I’ve got these CAS attributes
<cas:eduPersonAffiliation>student</cas:eduPersonAffiliation>
<cas:eduPersonAffiliation>employee</cas:eduPersonAffiliation>
<cas:eduPersonAffiliation>former_employee</cas:eduPersonAffiliation>and want to allow if they have the employee affiliation. -CONTAINS inappropriately allows the user if they only have former_employee. I tried various combinations like:
(CAS{eduPersonAffiliation} -IN “employee”) -AND (CAS{eduPersonAffiliation} -NOTIN “_employee”)
(CAS{eduPersonAffiliation} -CONTAINS “employee”) -AND (CAS{eduPersonAffiliation} -NOT -CONTAINS “_employee”)
(CAS{eduPersonAffiliation} -CONTAINS “employee”) -AND -NOT (CAS{eduPersonAffiliation} -CONTAINS “_employee”)
(CAS{eduPersonAffiliation} -CONTAINS “employee”) -NOT (CAS{eduPersonAffiliation} -CONTAINS “_employee”)I’m also not clear how to test this in test.php. Here’s what I’ve got, which incorrectly yields bool(false):
$mock_cas_object = array( 'first_name' => 'someuser', 'email' => '[email protected]', 'eduPersonAffiliation' => array('employee,student,former_employee') ); ... $condition = '(CAS{eduPersonAffiliation} -IN "employee")';I’m using the very latest release.
Forum: Plugins
In reply to: [WP Cassify] Where’s the backup file?Another couple of fixes is needed for multisite wp-cassify config backup to work:
wp-cassify\admin\admin-menu.php::wp_cassify_export_configuration_options_settings() – replace false in the export function call with $wp_cassify_network_activated:
if (! empty( $_POST['wp_cassify_backup_plugin_options_settings'] ) ){ global $wp_cassify_network_activated; $wp_cassify_backup_plugin_options_settings = WP_Cassify_Utils::wp_cassify_export_configuration_options( $wp_cassify_network_activated ); nocache_headers();————————
wp-cassify\classes\wp_cassify_utils.php::wp_cassify_export_configuration_options() – network option key and value names differ, so need their own for loop
if ($wp_cassify_network_activated) { $configuration_options = $wpdb->get_results("SELECT <code>meta_key</code>,</code>meta_value</code> FROM {$wpdb->prefix}sitemeta WHERE <code>meta_key</code> LIKE 'wp_cassify%' AND</code>meta_key</code> != 'wp_cassify_xml_response_value'"); foreach ($configuration_options as $configuration_option) { $wp_cassify_export_configuration_options[$configuration_option->meta_key] = $configuration_option->meta_value; } } else { $configuration_options = $wpdb->get_results("SELECT <code>option_name</code>,</code>option_value</code> FROM {$wpdb->prefix}options WHERE <code>option_name</code> LIKE 'wp_cassify%' AND</code>meta_key</code> != 'wp_cassify_xml_response_value'"); foreach ($configuration_options as $configuration_option) { $wp_cassify_export_configuration_options[$configuration_option->option_name] = $configuration_option->option_value; } }- This reply was modified 8 years, 1 month ago by buddywhatshisname. Reason: Skip export of wp_cassify_xml_response_value
- This reply was modified 8 years, 1 month ago by Steven Stern (sterndata).
Forum: Plugins
In reply to: [WP Cassify] Where’s the backup file?The problem is that
wp-cassify\admin\admin-menu.php::wp_cassify_create_network_menu() does not include these two hooks:// Call export plugin configurations settings function add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this , 'wp_cassify_export_configuration_options_settings' ) ); // Call import plugin configurations settings function add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this , 'wp_cassify_import_configuration_options_settings' ) );So testing in a single-site will not show the problem.
I suggest adding them via abstracting the add_action statements that are common to multisite and single site:
/** * Multisite and single-site add_action statements */ function wp_cassify_add_admin_actions() { // Add javascript needed by metaboxes add_action( 'admin_init', array( $this , 'wp_cassify_add_metaboxes_js' ) ); // Call export plugin configurations settings function add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this , 'wp_cassify_export_configuration_options_settings' ) ); // Call import plugin configurations settings function add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this , 'wp_cassify_import_configuration_options_settings' ) ); // Register differents metaboxes on admin screen. add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this, 'wp_cassify_register_metaboxes' ) ); // Add custom javascript functions specific to this plugin add_action( 'load-'. $this->wp_cassify_admin_page_hook, array( $this , 'wp_cassify_add_custom_js' ) ); } /** * Add admin menu options */ public function wp_cassify_create_menu() { $this->wp_cassify_admin_page_hook = add_options_page( $this->wp_cassify_plugin_datas['Name'] . ' Options', $this->wp_cassify_plugin_datas['Name'], 'manage_options', 'wp-cassify.php' , array( $this, 'wp_cassify_options' ) ); $this->wp_cassify_add_admin_actions(); } /** * Add admin menu options if plugin is activate over the network */ public function wp_cassify_create_network_menu() { $this->wp_cassify_admin_page_hook = add_submenu_page( 'settings.php', $this->wp_cassify_plugin_datas['Name'] . ' Options', $this->wp_cassify_plugin_datas['Name'], 'manage_options', 'wp-cassify.php' , array( $this, 'wp_cassify_options' ) ); // Call register settings function add_action( 'admin_init', array( $this , 'wp_cassify_register_plugin_settings' ) ); // Call register settings function add_action( 'admin_init', array( $this , 'wp_cassify_register_plugin_settings' ) ); $this->wp_cassify_add_admin_actions(); }- This reply was modified 8 years, 1 month ago by buddywhatshisname. Reason: Remove error_log() statement
Forum: Plugins
In reply to: [WP Activity Log] Disable email but still log events ?Found it – it’s More Privacy Options that is sending the emails and not your plugin.
Thanks for the guidance!
Forum: Plugins
In reply to: [WP Activity Log] Disable email but still log events ?Strange. I’ve not gone premium or installed any of the premium addons, yet I’m getting emails. No matter – I’ll filter them with the wp_mail hook.
Hm no it’s still the same problem with a fresh, clean WP multisite install. It might just be PHP-FPM, but this comment seems to be true in my case:
https://php.net/manual/en/ini.core.php#54186 1. Apache checks to see if the target file exists. 2. The prepend file is calledI haven’t managed to find much other references about this yet.
I will see if putting the auto_prepend_file into the .htaccess, php.ini or httpd.conf resolves the problem.
Hm OK – that’s must indeed be the case. I’ll selectively disable things and figure it out.
Thanks for taking the time too reply wyfrann.Thanks a ton wfalaa – worked great.
Forum: Plugins
In reply to: [WP Cassify] Where’s the backup file?I wasn’t clear enough 🙂
I’m indeed clicking the ““Backup Plugin Configuration” button; id=”wp_cassify_backup_plugin_options_settings”. Tested also with
jQuery(‘#wp_cassify_backup_plugin_options_settings’).click()
No JS console errors show.Tested with WP 4.9 with no other plugins/themes and a clean nightly WP build; multisite; Chrome latest on Windows.
The request is to
/wp-admin/network/settings.php?page=wp-cassify.php
and the request payload shows a form submission of the form data.Forum: Plugins
In reply to: [IP Geo Block] Regex or wildcards in “Bad signatures in query”?Thank you – great answer.