GeoWebCache

Ticket #91 (closed defect: fixed)

Opened 14 months ago

Last modified 12 months ago

zeroPadder initializes StringBuilder with negative size

Reported by: icetan Owned by: arneke
Priority: normal Milestone: 1.2
Component: blobstore Version: 1.1.5
Keywords: Cc: geowebcache-devel@…
Total Hours: 0.0 Estimated Hours:

Description

When requesting tiles with a high storage index GWC returns a 400 error with "null" as description. I found that the method zeroPadder in FilePathGenerator? when called with a number parameter with a length greater then the order parameter throws an exception. This is due to that a StringBuilder? is initialized with a negative size. I have created a patch that adds a check for how many zeros to pad and if it is zero or less then it just returns number as a string.

Attachments

gwc_file_path_generator_patch.txt (1.0 kB) - added by icetan 14 months ago.
patch for zeroPadder

Change History

Changed 14 months ago by icetan

patch for zeroPadder

Changed 14 months ago by arneke

I understand the patch, but how did you trigger this, i.e. can you provide configuration file and request that results in the null?

Changed 14 months ago by arneke

  • priority changed from major to minor
  • status changed from new to closed
  • resolution set to missing feedback

Closing due to lack of feedback. Anyone should feel free to reopen if they can explain how the problem arises.

Changed 12 months ago by arneke

  • status changed from closed to reopened
  • resolution missing feedback deleted

Changed 12 months ago by arneke

  • priority changed from minor to normal
  • status changed from reopened to closed
  • version set to 1.1.5
  • resolution set to fixed
  • milestone set to 1.2

Got it. So it happens when you define your own grid and it's not square, which means the 2x assumption fails.

I looked into passing the actual extent of the grid all the way into the path generator, but it's just too much of a hassle for directories that will noe be particularly readable for humans anyway.

Note: See TracTickets for help on using tickets.