Changeset 3184249
- Timestamp:
- 11/08/2024 08:00:43 AM (16 months ago)
- Location:
- miniorange-wp-as-saml-idp
- Files:
-
- 234 added
- 5 edited
-
tags/1.15.7 (added)
-
tags/1.15.7/MoIDP.php (added)
-
tags/1.15.7/MoIDPAutoload.php (added)
-
tags/1.15.7/MoIDPSettings.php (added)
-
tags/1.15.7/SplClassLoader.php (added)
-
tags/1.15.7/actions (added)
-
tags/1.15.7/actions/BasePostAction.php (added)
-
tags/1.15.7/actions/RegistrationActions.php (added)
-
tags/1.15.7/actions/SSOActions.php (added)
-
tags/1.15.7/actions/SettingsActions.php (added)
-
tags/1.15.7/actions/index.php (added)
-
tags/1.15.7/controllers (added)
-
tags/1.15.7/controllers/contact-button.php (added)
-
tags/1.15.7/controllers/feedback.php (added)
-
tags/1.15.7/controllers/index.php (added)
-
tags/1.15.7/controllers/plugin-details.php (added)
-
tags/1.15.7/controllers/sso-attr-settings.php (added)
-
tags/1.15.7/controllers/sso-idp-addons.php (added)
-
tags/1.15.7/controllers/sso-idp-data.php (added)
-
tags/1.15.7/controllers/sso-idp-navbar.php (added)
-
tags/1.15.7/controllers/sso-idp-profile.php (added)
-
tags/1.15.7/controllers/sso-idp-registration.php (added)
-
tags/1.15.7/controllers/sso-idp-request-demo.php (added)
-
tags/1.15.7/controllers/sso-idp-settings.php (added)
-
tags/1.15.7/controllers/sso-idp-support.php (added)
-
tags/1.15.7/controllers/sso-main-controller.php (added)
-
tags/1.15.7/controllers/sso-signin-settings.php (added)
-
tags/1.15.7/exception (added)
-
tags/1.15.7/exception/InvalidEncryptionCertException.php (added)
-
tags/1.15.7/exception/InvalidNumberOfNameIDsException.php (added)
-
tags/1.15.7/exception/InvalidOperationException.php (added)
-
tags/1.15.7/exception/InvalidPhoneException.php (added)
-
tags/1.15.7/exception/InvalidRequestInstantException.php (added)
-
tags/1.15.7/exception/InvalidRequestVersionException.php (added)
-
tags/1.15.7/exception/InvalidSSOUserException.php (added)
-
tags/1.15.7/exception/InvalidServiceProviderException.php (added)
-
tags/1.15.7/exception/InvalidSignatureInRequestException.php (added)
-
tags/1.15.7/exception/IssuerValueAlreadyInUseException.php (added)
-
tags/1.15.7/exception/JSErrorException.php (added)
-
tags/1.15.7/exception/MetadataFileException.php (added)
-
tags/1.15.7/exception/MissingIDException.php (added)
-
tags/1.15.7/exception/MissingIssuerValueException.php (added)
-
tags/1.15.7/exception/MissingNameIdException.php (added)
-
tags/1.15.7/exception/MissingWaAttributeException.php (added)
-
tags/1.15.7/exception/MissingWtRealmAttributeException.php (added)
-
tags/1.15.7/exception/NoServiceProviderConfiguredException.php (added)
-
tags/1.15.7/exception/NotRegisteredException.php (added)
-
tags/1.15.7/exception/OTPRequiredException.php (added)
-
tags/1.15.7/exception/OTPSendingFailedException.php (added)
-
tags/1.15.7/exception/OTPValidationFailedException.php (added)
-
tags/1.15.7/exception/PasswordMismatchException.php (added)
-
tags/1.15.7/exception/PasswordResetFailedException.php (added)
-
tags/1.15.7/exception/PasswordStrengthException.php (added)
-
tags/1.15.7/exception/RegistrationRequiredFieldsException.php (added)
-
tags/1.15.7/exception/RequiredFieldsException.php (added)
-
tags/1.15.7/exception/RequiredSpNameException.php (added)
-
tags/1.15.7/exception/SPNameAlreadyInUseException.php (added)
-
tags/1.15.7/exception/SupportQueryRequiredFieldsException.php (added)
-
tags/1.15.7/exception/index.php (added)
-
tags/1.15.7/handler (added)
-
tags/1.15.7/handler/BaseHandler.php (added)
-
tags/1.15.7/handler/DemoRequestHandler.php (added)
-
tags/1.15.7/handler/FeedbackHandler.php (added)
-
tags/1.15.7/handler/IDPSettingsHandler.php (added)
-
tags/1.15.7/handler/ProcessRequestHandler.php (added)
-
tags/1.15.7/handler/ReadRequestHandler.php (added)
-
tags/1.15.7/handler/RegistrationHandler.php (added)
-
tags/1.15.7/handler/RegistrationUtility.php (added)
-
tags/1.15.7/handler/SPSettingsHandler.php (added)
-
tags/1.15.7/handler/SPSettingsUtility.php (added)
-
tags/1.15.7/handler/SendResponseHandler.php (added)
-
tags/1.15.7/handler/SupportHandler.php (added)
-
tags/1.15.7/handler/index.php (added)
-
tags/1.15.7/helper (added)
-
tags/1.15.7/helper/common (added)
-
tags/1.15.7/helper/common/Utils (added)
-
tags/1.15.7/helper/common/Utils/XPath.php (added)
-
tags/1.15.7/helper/common/Utils/index.php (added)
-
tags/1.15.7/helper/common/XMLSecEnc.php (added)
-
tags/1.15.7/helper/common/XMLSecurityDSig.php (added)
-
tags/1.15.7/helper/common/XMLSecurityKey.php (added)
-
tags/1.15.7/helper/common/index.php (added)
-
tags/1.15.7/helper/constants (added)
-
tags/1.15.7/helper/constants/MoIDPConstants.php (added)
-
tags/1.15.7/helper/constants/MoIDPMessages.php (added)
-
tags/1.15.7/helper/constants/MoIdPDisplayMessages.php (added)
-
tags/1.15.7/helper/constants/index.php (added)
-
tags/1.15.7/helper/database (added)
-
tags/1.15.7/helper/database/MoDbQueries.php (added)
-
tags/1.15.7/helper/database/index.php (added)
-
tags/1.15.7/helper/factory (added)
-
tags/1.15.7/helper/factory/RequestDecisionHandler.php (added)
-
tags/1.15.7/helper/factory/RequestHandlerFactory.php (added)
-
tags/1.15.7/helper/factory/ResponseDecisionHandler.php (added)
-
tags/1.15.7/helper/factory/ResponseHandlerFactory.php (added)
-
tags/1.15.7/helper/factory/index.php (added)
-
tags/1.15.7/helper/index.php (added)
-
tags/1.15.7/helper/saml2 (added)
-
tags/1.15.7/helper/saml2/AuthnRequest.php (added)
-
tags/1.15.7/helper/saml2/GenerateResponse.php (added)
-
tags/1.15.7/helper/saml2/MetadataGenerator.php (added)
-
tags/1.15.7/helper/saml2/MetadataReader.php (added)
-
tags/1.15.7/helper/saml2/index.php (added)
-
tags/1.15.7/helper/traits (added)
-
tags/1.15.7/helper/traits/Instance.php (added)
-
tags/1.15.7/helper/traits/index.php (added)
-
tags/1.15.7/helper/utilities (added)
-
tags/1.15.7/helper/utilities/Integrations.php (added)
-
tags/1.15.7/helper/utilities/MenuItems.php (added)
-
tags/1.15.7/helper/utilities/MoIDPUtility.php (added)
-
tags/1.15.7/helper/utilities/MoIDPcURL.php (added)
-
tags/1.15.7/helper/utilities/PluginPageDetails.php (added)
-
tags/1.15.7/helper/utilities/SAMLUtilities.php (added)
-
tags/1.15.7/helper/utilities/SupportedIntegrations.php (added)
-
tags/1.15.7/helper/utilities/TabDetails.php (added)
-
tags/1.15.7/helper/utilities/Tabs.php (added)
-
tags/1.15.7/helper/utilities/index.php (added)
-
tags/1.15.7/helper/wsfed (added)
-
tags/1.15.7/helper/wsfed/GenerateWsFedResponse.php (added)
-
tags/1.15.7/helper/wsfed/WsFedRequest.php (added)
-
tags/1.15.7/helper/wsfed/index.php (added)
-
tags/1.15.7/includes (added)
-
tags/1.15.7/includes/css (added)
-
tags/1.15.7/includes/css/index.php (added)
-
tags/1.15.7/includes/css/mo_idp_style.css (added)
-
tags/1.15.7/includes/css/mo_idp_style.min.css (added)
-
tags/1.15.7/includes/html (added)
-
tags/1.15.7/includes/html/emailtemplate.html (added)
-
tags/1.15.7/includes/html/emailtemplate.min.html (added)
-
tags/1.15.7/includes/html/index.php (added)
-
tags/1.15.7/includes/images (added)
-
tags/1.15.7/includes/images/61456.png (added)
-
tags/1.15.7/includes/images/Absorb.png (added)
-
tags/1.15.7/includes/images/Magic-members-wordpress-membership-plugin.jpg (added)
-
tags/1.15.7/includes/images/Membermouse.png (added)
-
tags/1.15.7/includes/images/Nextcloud.png (added)
-
tags/1.15.7/includes/images/Tableau.png (added)
-
tags/1.15.7/includes/images/Zoom-Logo.png (added)
-
tags/1.15.7/includes/images/absorb-lms.png (added)
-
tags/1.15.7/includes/images/add-ons.png (added)
-
tags/1.15.7/includes/images/angry.png (added)
-
tags/1.15.7/includes/images/armember.png (added)
-
tags/1.15.7/includes/images/buddypress.png (added)
-
tags/1.15.7/includes/images/buddypress_logo.png (added)
-
tags/1.15.7/includes/images/canvas.png (added)
-
tags/1.15.7/includes/images/check-mark.png (added)
-
tags/1.15.7/includes/images/cognito.png (added)
-
tags/1.15.7/includes/images/complete-wp-member.png (added)
-
tags/1.15.7/includes/images/download-icon.png (added)
-
tags/1.15.7/includes/images/freshdesk.jpg (added)
-
tags/1.15.7/includes/images/happy.png (added)
-
tags/1.15.7/includes/images/idp_addons.png (added)
-
tags/1.15.7/includes/images/idp_attr_settings.png (added)
-
tags/1.15.7/includes/images/idp_configure_idp.png (added)
-
tags/1.15.7/includes/images/idp_metadata.png (added)
-
tags/1.15.7/includes/images/idp_profile.png (added)
-
tags/1.15.7/includes/images/idp_request_demo.png (added)
-
tags/1.15.7/includes/images/idp_signin_settings.png (added)
-
tags/1.15.7/includes/images/idp_support.png (added)
-
tags/1.15.7/includes/images/idp_upgrade_settings.png (added)
-
tags/1.15.7/includes/images/index.php (added)
-
tags/1.15.7/includes/images/learndash.png (added)
-
tags/1.15.7/includes/images/loader.gif (added)
-
tags/1.15.7/includes/images/lock.png (added)
-
tags/1.15.7/includes/images/logo.png (added)
-
tags/1.15.7/includes/images/memberpress.jpg (added)
-
tags/1.15.7/includes/images/memberpress.png (added)
-
tags/1.15.7/includes/images/memberpress.svg (added)
-
tags/1.15.7/includes/images/miniorange.png (added)
-
tags/1.15.7/includes/images/miniorange_icon.png (added)
-
tags/1.15.7/includes/images/moodle.jpg (added)
-
tags/1.15.7/includes/images/moodle.png (added)
-
tags/1.15.7/includes/images/next.png (added)
-
tags/1.15.7/includes/images/normal.png (added)
-
tags/1.15.7/includes/images/open-book.png (added)
-
tags/1.15.7/includes/images/optimonster.png (added)
-
tags/1.15.7/includes/images/paid-memberships-pro.png (added)
-
tags/1.15.7/includes/images/paid_mem_pro.png (added)
-
tags/1.15.7/includes/images/restrict-content-pro-logo.png (added)
-
tags/1.15.7/includes/images/s2member.png (added)
-
tags/1.15.7/includes/images/sad.png (added)
-
tags/1.15.7/includes/images/salesforce.png (added)
-
tags/1.15.7/includes/images/smile.png (added)
-
tags/1.15.7/includes/images/star.png (added)
-
tags/1.15.7/includes/images/talentlms-logo.png (added)
-
tags/1.15.7/includes/images/teachable.png (added)
-
tags/1.15.7/includes/images/ultimatemember.png (added)
-
tags/1.15.7/includes/images/upload.png (added)
-
tags/1.15.7/includes/images/wishlist-member.png (added)
-
tags/1.15.7/includes/images/woocommerce.png (added)
-
tags/1.15.7/includes/images/wordpress.png (added)
-
tags/1.15.7/includes/images/wp-members.png (added)
-
tags/1.15.7/includes/images/zoho-logo.png (added)
-
tags/1.15.7/includes/images/zoom.jpg (added)
-
tags/1.15.7/includes/index.php (added)
-
tags/1.15.7/includes/js (added)
-
tags/1.15.7/includes/js/index.php (added)
-
tags/1.15.7/includes/js/settings.js (added)
-
tags/1.15.7/includes/js/settings.min.js (added)
-
tags/1.15.7/includes/resources (added)
-
tags/1.15.7/includes/resources/.htaccess (added)
-
tags/1.15.7/includes/resources/idp-signing-new.crt (added)
-
tags/1.15.7/includes/resources/idp-signing-new.key (added)
-
tags/1.15.7/includes/resources/idp-signing.crt (added)
-
tags/1.15.7/includes/resources/idp-signing.key (added)
-
tags/1.15.7/includes/resources/index.php (added)
-
tags/1.15.7/index.php (added)
-
tags/1.15.7/metadata.xml (added)
-
tags/1.15.7/readme.txt (added)
-
tags/1.15.7/uninstall.php (added)
-
tags/1.15.7/views (added)
-
tags/1.15.7/views/attr-settings.php (added)
-
tags/1.15.7/views/common-elements.php (added)
-
tags/1.15.7/views/contact-button.php (added)
-
tags/1.15.7/views/demo-request.php (added)
-
tags/1.15.7/views/feedback.php (added)
-
tags/1.15.7/views/idp-addons.php (added)
-
tags/1.15.7/views/idp-data.php (added)
-
tags/1.15.7/views/idp-delete.php (added)
-
tags/1.15.7/views/idp-error.php (added)
-
tags/1.15.7/views/idp-jwt-settings.php (added)
-
tags/1.15.7/views/idp-settings.php (added)
-
tags/1.15.7/views/idp-support.php (added)
-
tags/1.15.7/views/idp-wsfed-settings.php (added)
-
tags/1.15.7/views/index.php (added)
-
tags/1.15.7/views/navbar.php (added)
-
tags/1.15.7/views/plugin-details.php (added)
-
tags/1.15.7/views/registration (added)
-
tags/1.15.7/views/registration/index.php (added)
-
tags/1.15.7/views/registration/new-registration.php (added)
-
tags/1.15.7/views/registration/verify-customer.php (added)
-
tags/1.15.7/views/registration/verify-otp.php (added)
-
tags/1.15.7/views/signin-settings.php (added)
-
tags/1.15.7/views/user-profile.php (added)
-
trunk/MoIDPAutoload.php (modified) (1 diff)
-
trunk/MoIDPSettings.php (modified) (1 diff)
-
trunk/helper/database/MoDbQueries.php (modified) (16 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/views/idp-delete.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
miniorange-wp-as-saml-idp/trunk/MoIDPAutoload.php
r3158222 r3184249 12 12 use IDP\SplClassLoader; 13 13 14 define( 'MSI_VERSION', '1.15. 6' );14 define( 'MSI_VERSION', '1.15.7' ); 15 15 define( 'MSI_DB_VERSION', '1.5' ); 16 16 define( 'MSI_DIR', plugin_dir_path( __FILE__ ) ); -
miniorange-wp-as-saml-idp/trunk/MoIDPSettings.php
r3158222 r3184249 4 4 * Plugin URI: https://plugins.miniorange.com/wordpress-saml-idp 5 5 * Description: Convert your WordPress into an IDP. 6 * Version: 1.15. 66 * Version: 1.15.7 7 7 * Author: miniOrange 8 8 * Author URI: https://plugins.miniorange.com/ -
miniorange-wp-as-saml-idp/trunk/helper/database/MoDbQueries.php
r3132583 r3184249 203 203 private function mo_update_protocol_type() { 204 204 global $wpdb; 205 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_protocol_type longtext NOT NULL', $this->sp_data_table_name ) );206 // $wpdb->query( $wpdb->prepare( 'UPDATE %i SET mo_idp_protocol_type = "SAML"', $this->sp_data_table_name ) );207 205 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' ADD COLUMN mo_idp_protocol_type longtext NOT NULL' ); 208 206 $wpdb->query( 'UPDATE ' . $this->sp_data_table_name . " SET mo_idp_protocol_type = 'SAML'" ); … … 217 215 private function mo_update_logout() { 218 216 global $wpdb; 219 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_logout_url longtext NULL', $this->sp_data_table_name ) );220 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_logout_binding_type varchar(15) DEFAULT "HttpRedirect" NOT NULL', $this->sp_data_table_name ) );221 217 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' ADD COLUMN mo_idp_logout_url longtext NULL' ); 222 218 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . " ADD COLUMN mo_idp_logout_binding_type varchar(15) DEFAULT 'HttpRedirect' NOT NULL" ); … … 231 227 private function mo_update_cert() { 232 228 global $wpdb; 233 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_cert_encrypt longtext NULL', $this->sp_data_table_name ) );234 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_encrypted_assertion smallint NULL', $this->sp_data_table_name ) );235 229 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' ADD COLUMN mo_idp_cert_encrypt longtext NULL' ); 236 230 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' ADD COLUMN mo_idp_encrypted_assertion smallint NULL' ); … … 245 239 private function mo_update_relay() { 246 240 global $wpdb; 247 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_idp_default_relayState longtext NULL', $this->sp_data_table_name ) );248 241 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' ADD COLUMN mo_idp_default_relayState longtext NULL' ); 249 242 } … … 257 250 private function mo_update_custom_attr() { 258 251 global $wpdb; 259 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i ADD COLUMN mo_attr_type smallint DEFAULT 0 NOT NULL', $this->sp_attr_table_name ) );260 // $wpdb->update( $this->sp_attr_table_name, array( 'mo_attr_type' => '1' ), array( 'mo_sp_attr_name' => 'groupMapName' ) );261 252 $wpdb->query( 'ALTER TABLE ' . $this->sp_attr_table_name . ' ADD COLUMN mo_attr_type smallint DEFAULT 0 NOT NULL' ); 262 253 $wpdb->update( $this->sp_attr_table_name, array( 'mo_attr_type' => '1' ), array( 'mo_sp_attr_name' => 'groupMapName' ) ); … … 270 261 public function get_sp_list() { 271 262 global $wpdb; 272 // return $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i', $this->sp_data_table_name ) );273 263 return $wpdb->get_results( 'SELECT * FROM ' . $this->sp_data_table_name ); 274 264 } … … 283 273 public function get_sp_data( $id ) { 284 274 global $wpdb; 285 // return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %i WHERE id=%s', array( $this->sp_data_table_name, $id ) ) ); 286 return $wpdb->get_row( 'SELECT * FROM ' . $this->sp_data_table_name . ' WHERE id=' . $id ); 275 return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $this->sp_data_table_name . ' WHERE id=%s', $id ) ); 287 276 } 288 277 … … 294 283 public function get_sp_count() { 295 284 global $wpdb; 296 // return $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM %i', $this->sp_data_table_name ) );297 285 $sql = 'SELECT COUNT(*) FROM ' . $this->sp_data_table_name; 298 286 return $wpdb->get_var( $sql ); … … 300 288 301 289 /** 302 * Get all the profile attribute mapping done for the 303 * SP from the Attribute table. Doesn't return the role 304 * mapping or the custom attributes. There are separate 305 * functions for that. 290 * Gets all the Attribute mapping done for the 291 * SP from the Attribute table. 306 292 * 307 293 * @param string $id References the ID of the SP in the database. 308 294 * @return array|object|null 309 295 */ 310 public function get_sp_attributes( $id ) {311 global $wpdb;312 // return $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_sp_id = %s AND mo_sp_attr_name <> "groupMapName" AND mo_attr_type = 0', array( $this->sp_attr_table_name, $id ) ) );313 return $wpdb->get_results( 'SELECT * FROM ' . $this->sp_attr_table_name . " WHERE mo_sp_id = $id AND mo_sp_attr_name <> 'groupMapName' AND mo_attr_type = 0" );314 }315 316 /**317 * Get all the Role attribute mapping done for the318 * SP from the Attribute table.319 *320 * @param string $id References the ID of the SP in the database.321 * @return array|object|null|void322 */323 public function get_sp_role_attribute( $id ) {324 global $wpdb;325 // return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_sp_id = %s AND mo_sp_attr_name = "groupMapName"', array( $this->sp_attr_table_name, $id ) ) );326 return $wpdb->get_row( 'SELECT * FROM ' . $this->sp_attr_table_name . " WHERE mo_sp_id = $id AND mo_sp_attr_name = 'groupMapName'" );327 }328 329 /**330 * Gets all the Attribute mapping done for the331 * SP from the Attribute table.332 *333 * @param string $id References the ID of the SP in the database.334 * @return array|object|null335 */336 296 public function get_all_sp_attributes( $id ) { 337 297 global $wpdb; 338 // return $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_sp_id = %s', array( $this->sp_attr_table_name, $id ) ) ); 339 return $wpdb->get_results( 'SELECT * FROM ' . $this->sp_attr_table_name . " WHERE mo_sp_id = $id " ); 298 return $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM ' . $this->sp_attr_table_name . ' WHERE mo_sp_id = %s', $id ) ); 340 299 } 341 300 … … 349 308 public function get_sp_from_issuer( $issuer ) { 350 309 global $wpdb; 351 // return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_idp_sp_issuer = %s', array( $this->sp_attr_table_name, $issuer ) ) ); 352 return $wpdb->get_row( 'SELECT * FROM ' . $this->sp_data_table_name . " WHERE mo_idp_sp_issuer = '$issuer'" ); 310 return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $this->sp_data_table_name . ' WHERE mo_idp_sp_issuer = %s', $issuer ) ); 353 311 } 354 312 … … 362 320 public function get_sp_from_name( $name ) { 363 321 global $wpdb; 364 // return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_idp_sp_name = %s', array( $this->sp_attr_table_name, $name ) ) ); 365 return $wpdb->get_row( 'SELECT * FROM ' . $this->sp_data_table_name . " WHERE mo_idp_sp_name = '$name'" ); 322 return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $this->sp_data_table_name . ' WHERE mo_idp_sp_name = %s', $name ) ); 366 323 } 367 324 … … 375 332 public function get_sp_from_acs( $acs ) { 376 333 global $wpdb; 377 // return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_idp_acs_url = %s', array( $this->sp_attr_table_name, $acs ) ) ); 378 return $wpdb->get_row( 'SELECT * FROM ' . $this->sp_data_table_name . " WHERE mo_idp_acs_url = '$acs'" ); 334 return $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $this->sp_data_table_name . ' WHERE mo_idp_acs_url = %s', $acs ) ); 379 335 } 380 336 … … 444 400 public function update_metadata_data() { 445 401 global $wpdb; 446 // $wpdb->query( $wpdb->prepare( 'DELETE FROM %i', $this->sp_data_table_name ) );447 // $wpdb->query( $wpdb->prepare( 'ALTER TABLE %i AUTO_INCREMENT=0', $this->sp_data_table_name ) );448 402 $wpdb->query( 'DELETE FROM ' . $this->sp_data_table_name ); 449 403 $wpdb->query( 'ALTER TABLE ' . $this->sp_data_table_name . ' AUTO_INCREMENT=0' ); … … 490 444 } 491 445 492 493 446 /** 494 447 * Deletes the SP attribute data from the Attribute table. … … 500 453 global $wpdb; 501 454 $wpdb->delete( $this->sp_attr_table_name, $attr_where, $where_format = null ); 502 }503 504 /**505 * Insert the SP attribute data into Attribute table.506 *507 * @param array $data_attr References the data to be put in the table.508 * @return void509 */510 public function insert_sp_attributes( $data_attr ) {511 global $wpdb;512 $wpdb->insert( $this->sp_attr_table_name, $data_attr );513 }514 515 /**516 * Fetch the Custom Attributes for the SP from the Attribute517 * Table.518 *519 * @param string $id References the ID of the SP in the database.520 * @return array|object|null521 */522 public function get_custom_sp_attr( $id ) {523 global $wpdb;524 // return $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM %i WHERE mo_sp_id = %s AND mo_attr_type = 2', array( $this->sp_attr_table_name, $id ) ) );525 return $wpdb->get_results( 'SELECT * FROM ' . $this->sp_attr_table_name . " WHERE mo_sp_id = $id AND mo_attr_type = 2" );526 }527 528 /**529 * Fetch the number of users who have performed SSO using the plugin.530 * Checks the user_meta table for users who have mo_idp_user_type531 * as a meta key.532 *533 * @return string|null534 */535 public function get_users() {536 global $wpdb;537 // return $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM %i WHERE meta_key="mo_idp_user_type"', $this->user_meta_table ) );538 return $wpdb->get_var( 'SELECT COUNT(*) FROM ' . $wpdb->prefix . "usermeta WHERE meta_key='mo_idp_user_type'" );539 }540 541 /**542 * Get protocol type from SP data table.543 *544 * @return array|object|null545 */546 public function get_protocol() {547 global $wpdb;548 // return $wpdb->get_results( $wpdb->prepare( 'SELECT mo_idp_protocol_type FROM %i', $this->sp_data_table_name ) );549 return $wpdb->get_results( 'SELECT mo_idp_protocol_type FROM ' . $this->sp_data_table_name );550 455 } 551 456 … … 558 463 public function get_distinct_meta_attributes() { 559 464 global $wpdb; 560 // return $wpdb->get_results( $wpdb->prepare( 'SELECT DISTINCT meta_key FROM %i', $this->user_meta_table ) );561 465 return $wpdb->get_results( 'SELECT DISTINCT meta_key FROM ' . $this->user_meta_table ); 562 466 } -
miniorange-wp-as-saml-idp/trunk/readme.txt
r3158222 r3184249 4 4 Tags: Login with WordPress, single sign on, SSO, identity provider, WordPress login, LMS, SAML IDP, Tableau, Moodle LMS Integration, Zoom, Nextcloud Login, Thinkific 5 5 Requires at least: 4.8 6 Tested up to: 6. 67 Stable tag: 1.15. 66 Tested up to: 6.7 7 Stable tag: 1.15.7 8 8 Requires PHP: 5.6 9 9 License: MIT/Expat … … 154 154 == Changelog == 155 155 156 = 1.15.7 = 157 * Compatibility with WordPress 6.7. 158 * Improved security for SQL Queries executed by the plugin. 159 156 160 = 1.15.6 = 157 161 * Migrated the php fopen and unlink calls to relevant WP Filesystem calls … … 364 368 == Upgrade Notice == 365 369 370 = 1.15.7 = 371 * Compatibility with WordPress 6.7. 372 * Improved security for SQL Queries executed by the plugin. 373 366 374 = 1.15.6 = 367 375 * Migrated the php fopen and unlink calls to relevant WP Filesystem calls -
miniorange-wp-as-saml-idp/trunk/views/idp-delete.php
r2903389 r3184249 17 17 <br>'; 18 18 if ( isset( $sp ) && ! empty( $sp ) ) { 19 if ( ! $disabled ) { 20 echo '<div><form method="post" id="mo_idp_delete_sp_settings_form" action="' . esc_url( $post_url ) . '"> 21 <input type="hidden" name="option" value="mo_idp_delete_sp_settings"/> 22 <input type="hidden" name="sp_id" value="' . esc_attr( $sp->id ) . '"/>'; 23 wp_nonce_field( $idp_sp_settings_nonce ); 24 echo '</form></div>'; 25 } 19 26 echo '<div class=""> 20 27 <span class="mo-idp-mt-5 mo-idp-home-card-link" > … … 39 46 echo ' </div> 40 47 </div>'; 41 if ( ! $disabled ) {42 echo '<form method="post" id="mo_idp_delete_sp_settings_form" action="' . esc_url( $post_url ) . '">43 <input type="hidden" name="option" value="mo_idp_delete_sp_settings"/>44 <input type="hidden" name="sp_id" value="' . esc_attr( $sp->id ) . '"/>';45 wp_nonce_field( $idp_sp_settings_nonce );46 echo '</form>';47 }
Note: See TracChangeset
for help on using the changeset viewer.