Skip to content

Fix - Improper validation of Signature field attachment paths - #1567

Open
NirajChaudhary143 wants to merge 1 commit into
pre-developfrom
EVF-2437-fix/improper-validation-of-signature-field
Open

Fix - Improper validation of Signature field attachment paths#1567
NirajChaudhary143 wants to merge 1 commit into
pre-developfrom
EVF-2437-fix/improper-validation-of-signature-field

Conversation

@NirajChaudhary143

@NirajChaudhary143 NirajChaudhary143 commented May 11, 2026

Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes # .

How to test the changes in this Pull Request:

Dependency PR Pro

Types of changes:

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (modification of the currently available functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?
  • Have you updated the documentation accordingly?

Changelog entry

Fix - Improper validation of Signature field attachment paths.

@NirajChaudhary143 NirajChaudhary143 self-assigned this May 11, 2026
@NirajChaudhary143 NirajChaudhary143 added bug Something isn't working [Status] Needs Test labels May 11, 2026
if ( file_exists( $meta_value ) ) {
$entry_files[] = $meta_value;
if ( is_string( $meta_value ) && '' !== $meta_value ) {
$upload_dir = wp_get_upload_dir();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NirajChaudhary143 wp_get_upload_dir() is internally cached by WordPress but wp_normalize_path() + trailingslashit() runs on every iteration. For entries with dozens of fields, this is needless work. Move both assignments before the foreach loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working [Status] Needs Test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants