Skip to content

Poor shortcode form_id validation #1436

Closed
@MissVeronica

Description

Describe the bug

[21-Jan-2024 11:29:32 UTC] PHP Warning:  Undefined array key "mode" in .../ultimate-member/includes/core/class-shortcodes.php on line 778
[21-Jan-2024 11:29:32 UTC] PHP Warning:  Undefined array key "mode" in .../ultimate-member/includes/core/class-shortcodes.php on line 781
[21-Jan-2024 11:29:32 UTC] PHP Warning:  Undefined array key "mode" in .../ultimate-member/includes/core/class-shortcodes.php on line 786
[21-Jan-2024 11:29:32 UTC] PHP Warning:  Undefined array key "mode" in .../ultimate-member/includes/core/class-shortcodes.php on line 989
[21-Jan-2024 11:29:32 UTC] PHP Warning:  Undefined array key "mode" in .../ultimate-member/includes/core/class-shortcodes.php on line 994

To Reproduce
Steps to reproduce the behavior:

  1. Find a post ID belonging to another plugin than UM for example Elementor or a WP page.
  2. Create a WP page with an UM shortcode [ultimatemember form_id="100"] where 100 is the Elementor post ID or WP page ID found in 1.
  3. Try to access the page with the UM shortcode with a non-UM form_id value.

Expected behavior
Validation of the form_id number belonging to UM in class-shortcodes.php/function load: WP post_type equal to um_directory or um_form maybe only beginning with um_

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions