Open nichita231 opened 1 week ago
The changes in includes/Registration.php
focus on reordering the nonce check logic within the set_new_vendor_names
and save_vendor_info
functions. By leveraging the result from the dokan_register_nonce_check
filter, the nonce validation is now conditional, potentially altering the functions' control flow based on the filter's outcome.
Files | Change Summary |
---|---|
includes/Registration.php |
Reordered nonce check in set_new_vendor_names and save_vendor_info functions based on a filter's result |
sequenceDiagram
participant Client
participant Registration
Client->>+Registration: set_new_vendor_names($data)
alt dokan_register_nonce_check = true
Registration->>Registration: Check empty($nonce_value)
alt $nonce_value is empty or invalid
Registration-->>Client: return $data
else $nonce_value is valid
Registration-->>Client: Process $data
end
else dokan_register_nonce_check = false
Registration-->>Client: Process $data
end
Client->>+Registration: save_vendor_info($user_id, $data)
alt dokan_register_nonce_check = true
Registration->>Registration: Check empty($nonce_value)
alt $nonce_value is empty or invalid
Registration-->>Client: return
else $nonce_value is valid
Registration-->>Client: Save $data
end
else dokan_register_nonce_check = false
Registration-->>Client: Save $data
end
In the code, a nonce we weave,
Filters guide and checks believe.
Secure flows to vendor shore,
Data safe, we do implore.
With changes bright, we leap ahead,
CodeRabbit smiles; no woes to dread. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issue: https://github.com/getdokan/dokan/issues/2279
Summary by CodeRabbit