Skip to content

Replace live URL embedded-image tests with deterministic local URL coverage #617

Closed

Description

@bbottema

The embedded-image URL auto-resolution tests currently depend on https://www.simplejavamail.org being reachable and trusted by the active JDK. That makes the tests vulnerable to local TLS interception, stale Java trust stores, public site availability, and CI networking differences.

Replace the live-site assumptions with deterministic local URL coverage. The tests should still exercise URL-based embedded image resolution, base URL joining, inside/outside base URL checks, and allowingEmbeddedImageOutsideBaseUrl(...), but without starting a server or relying on public HTTPS.

Activity

  1. added this to the 8.13.0 milestone on Jul 4, 2026
  2. bbottema commented on Jul 4, 2026

    @bbottema
    OwnerAuthor

    Fixed by f11e413c.

    The embedded-image URL auto-resolution tests no longer call https://www.simplejavamail.org. They now exercise the same absolute URL, relative URL, base URL, and outside-base behavior through deterministic local file: URLs, and the URL resolver now handles authority-less file: base URLs correctly.

  3. bbottema commented on Jul 8, 2026

    @bbottema
    OwnerAuthor

    Released in Simple Java Mail v9.0.0, which is now available from Maven Central:

    https://repo1.maven.org/maven2/org/simplejavamail/simple-java-mail/9.0.0/

    Release notes:
    https://github.com/bbottema/simple-java-mail/releases/tag/9.0.0

  4. bbottema commented on Aug 5, 2026

    @bbottema
    OwnerAuthor

    Security follow-up: #678 extends this deterministic coverage with adversarial containment tests. The file: URL tests remain useful, while v9.2.0 will also verify HTTP scheme/host/effective-port boundaries, traversal, and redirects.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions