The flaw lies in the lack of cryptographic binding between the 'uk' (user key) and the metadata parameters ('f' and 'sz'). The icloud.com landing page trusts the URL parameters to render the UI, and the CDN uses the 'f' parameter to set the Content-Disposition header. This allows an attacker to take a legitimate Maildrop link and rewrite its appearance entirely.
def generate_spoofed_link(original_uk, fake_name, fake_size):
    base_url = "https://www.icloud.com/attachment/"
    # No signature or binding between 'uk' and other params
    params = {
        'uk': original_uk,
        'f': fake_name,
        'sz': fake_size
    }
    return base_url + "?" + urlencode(params)
The fix requires server-side validation where the 'uk' is used to look up the *actual* metadata from a secure database, ignoring any client-provided 'f' or 'sz' parameters in the URL query string.