Plugin Directory

Changeset 3737024


Ignore:
Timestamp:
10/09/2026 03:50:41 PM (2 weeks ago)
Author:
axewww
Message:

FIx wrong commit

Location:
w3mypq/tags/3.2.6
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • w3mypq/tags/3.2.6/js/w3mypq.js

    r3736999 r3737024  
    859859      let sendMails = await recipientsSendEmails(uidsAry, sendToServer.download_link);
    860860
     861      if (sendMails && sendMails.message) {
     862       alert(sendMails.message);
     863      } else {
     864        alert("Operation processed: Notification routine completed.");
     865      }
     866
     867
    861868      dl.style.display = "block";
    862869      dl.href = u;
    … …  
    948955        formData.append('total_chunks', totalChunks);
    949956        formData.append('w3_encrypted_payload', blobSlice, 'data.w3mypq');
     957        formData.append('totPayload_size', encryptedContent.size);
    950958
    951959        if (progressTextEl) {
  • w3mypq/tags/3.2.6/readme.txt

    r3736999 r3737024  
    55Requires at least: 6.2
    66Tested up to: 7.1
    7 Stable tag: 3.2.5
     7Stable tag: 3.2.6
    88Requires PHP: 7.4
    99License: GPLv2 or later
    … …  
    149149
    150150= 3.2.6 =
    151 * Release Date: 08 Oct 2026
    152 Fix: Set drawer element .w3mypq-trigger as - display:none; - by default into w3mypq.css.
    153 
     151* Release Date: 09 Oct 2026
     152Fix: Update `wp-w3mypq.php` (and `w3mypq.js` ) to check that the full payload does not exceed the remaining daily quota, so as to prevent exhausting it unnecessarily, within the w3myPQ flow (previously only applied to BPQ endpoint).
     153Note: If the `w3mypq.js` file is not updated due to browser caching, the `wp-w3mypq.php` code will fall back to its previous behavior, exhausting the user's quota in the event of a large and then failed payload.
     154Security: Fix `function w3mypq_handle_incoming_rest_payload` on `wp-w3mypq.php`, avoid to send an empty metadata field to trigger a true match against an empty or expired database transient token.
     155UI-Fix: Added server-response alert message handling to the Php send_emails callback inside `w3mypq.js`.
     156Default theme: Set drawer element `.w3mypq-trigger` as - display:none; - by default into `w3mypq.css`.
    154157
    155158= 3.2.5 =
  • w3mypq/tags/3.2.6/wp-w3mypq.php

    r3736999 r3737024  
    44 * Plugin URI: http://www.axew3.com/w3
    55 * Description: Post-quantum encryption, decryption, ML-KEM, AES-GCM, ML-DSA, file sharing, keys vault, and WordPress shield.
    6  * Version: 3.2.5
     6 * Version: 3.2.6
    77 * Author: axewww
    88 * Author URI: http://www.axew3.com
    … …  
    640640        $stored_token = get_transient($w3_session_key);
    641641
    642         if (empty($stored_token) || $stored_token !== $provided_token) {
     642        if ( empty($stored_token) || empty($provided_token) || $stored_token !== $provided_token ) {
    643643            return new WP_REST_Response(array(
    644644                'status'  => 'error',
    … …  
    11321132    $permalink = isset( $params['w3_mypqPermalink'] ) ? esc_url_raw( $params['w3_mypqPermalink'] ) : home_url();
    11331133    $uid       = absint( get_current_user_id() );
    1134     $totPayload_size = intval( $params['totPayload_size'] );
     1134    // Set to 0 by default, so if it not exist it will exhaust the user's daily quota, behaving exactly as it did before.
     1135    $totPayload_size = !empty( $params['totPayload_size'] ) ? intval( $params['totPayload_size'] ) : 0;
    11351136
    11361137    // Extract Chunk Metadata Parameters Safely
    … …  
    11731174                $is_quota_exceeded = ( $current_usage_bytes_logged + $current_chunk_size ) > $quota_max_allowed_bytes;
    11741175            }
    1175            
     1176
     1177            // Check that the full payload does not exceed the remaining quota so as to prevent exhausting it with a failed upload.
     1178
     1179            $current_usage_bytes_logged = round($current_usage_bytes_logged / 1048576, 2);
     1180            $totPayload_size = round($totPayload_size / 1048576, 2);
     1181
    11761182            $remaining_quota = $daily_quota_setting_mb - $current_usage_bytes_logged;
    1177            
    1178             file_put_contents('D:\Edit1', "$daily_quota_setting_mb - $current_usage_bytes_logged - $totPayload_size");
    1179            
     1183
    11801184            if ( $totPayload_size > $remaining_quota )
    11811185            {
Note: See TracChangeset for help on using the changeset viewer.