• Rouslan Solomakhin's avatar
    [Web Payment] Additional Mojo validation. · 549b3adb
    Rouslan Solomakhin authored
    Before this patch, a Mojo message PaymentRequest.Init() with null
    details, id, or total would not be rejected and could cause null pointer
    dereferences in the browser.
    
    This patch adds checks for null details, id, and total in the browser,
    so the invalid Mojo IPC messages are rejected.
    
    After this patch, a Mojo message PaymentRequest.Init() with null
    details, id, or total is rejected, so the transaction is aborted.
    
    Bug: 1148074
    Change-Id: I39c821eef034cafc4ed830769785fb812304f678
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2556470Reviewed-by: default avatarLiquan (Max) Gu <maxlg@chromium.org>
    Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#831005}
    549b3adb
payment_request.cc 35.6 KB