PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 3.5.4
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v3.5.4
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
← All changes | includes/frontend/class-wpsc-frontend.php +9 -2 3.5.0 → 3.5.4 View file →
@@ -37,8 +37,16 @@
37 37 if ( ! $ticket->id ) {
38 38 return;
39 39 }
40 40
41 + // Validate the submitted auth code against the stored one before
42 + // doing anything with the ticket. Never redirect to (and thereby
43 + // disclose) the real ticket URL/auth code for an invalid guess.
44 + $submitted_auth_code = sanitize_text_field( wp_unslash( $_REQUEST['auth_code'] ) ); // phpcs:ignore
45 + if ( ! $ticket->auth_code || ! $submitted_auth_code || ! hash_equals( (string) $ticket->auth_code, $submitted_auth_code ) ) {
46 + return;
47 + }
48 +
41 49 wp_safe_redirect( $ticket->get_url() );
42 50 exit;
43 51 }
44 52 }
@@ -50,10 +58,9 @@
50 58 */
51 59 public static function load_scripts() {
52 60
53 61 // Check load scripts setting to load script on perticular page.
54 - $page_settings = get_option( 'wpsc-gs-page-settings' );
55 - if ( $page_settings['load-scripts'] == 'custom' && ! in_array( get_the_id(), $page_settings['load-script-pages'] ) ) {
62 + if ( ! WPSC_Functions::is_load_scripts_page() ) {
56 63 return;
57 64 }
58 65
59 66 // jquery.