google / earthenterprise

Google Earth Enterprise - Open Source
Apache License 2.0
2.67k stars 887 forks source link

Improperly formatted icon requests to portables can crash the server #1905

Closed tst-lsavoie closed 3 years ago

tst-lsavoie commented 3 years ago

To Reproduce

  1. Publish a database
  2. Enable cutter and cut a portable map or globe from the database. You may need to include a vector layer.
  3. From the admin console, click "Manage Portables", then "Register" next to a portable map
  4. Publish the newly registered portable
  5. Access the following URL: http://server-url/portable-name/flatfile?lf-0-=icons/773_l.png

The server will stop serving tiles and there will be a segfault in the error log.

Expected behavior

The server returns a 404 when it receives a malformed URL

Additional context

The correct URL is http://server-url/portable-name/flatfile?lf-0-icons/773_l.png (without the =).