Skip to content

disable Built-in OpenLayers by default #7484

Open

Description

@tjay

In light of the security warning GHSA-4g9f-ph64-hg2, would it be a good idea to create a flag to explicitly enable the built-in OpenLayers function? I was a bit surprised that every client can activate it via the OGC format parameter. It doesn't appear in the capabilities list and behaves like a hidden feature.

A suggestion for the MapServer Environment Variables:

CONFIG  "MS_OPENLAYERS_ENABLE" "1"

Activity

  1. jmckenna commented on Apr 22, 2026

    @jmckenna
    Member

    Thanks @tjay I fully agree with you (in earlier discussions I suggested the same, and I had added it as a wishlist item to the 8.8 release plan). We need a way for users to easily disable access the the built-in viewer (and CONFIG "MS_OPENLAYERS_ENABLE" is the most intuitive way for users). Thanks for filing this here.

  2. geographika commented on Aug 21, 2026

    @geographika
    Member

    Note you can currently limit WMS formats using wms_getmap_formatlist e.g.:

    WEB
        METADATA
          "wms_getmap_formatlist" "image/png,image/gif,image/png; mode=24bit,image/jpeg,image/vnd.wap.wbmp,image/tiff,image/svg+xml"
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions