Patch #35312

Gracefully handle invalid operators and associations requested in queries

Added by Holger Just 4 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues filter
Target version:5.0.0

Description

Users can request arbitrary operators or custom field associations for fields in queries for issues or time entries. This is validated in the Query class with an exception being raised if an invalid operator or custom field association was requested.

The attached patch handles this case by raising a named Error instead and gracefully handling this error in the UI by logging the original exception and rendering a 404 error.

0001-Gracefully-handle-invalid-query-parameters-for-custo.patch Magnifier (4.66 KB) Holger Just, 2021-05-25 20:04


Related issues

Related to Redmine - Defect #35062: Back URLs with <t+ operator break New
Related to Redmine - Patch #35500: Add missing fixture to IssuesTest Closed

Associated revisions

Revision 21012
Added by Go MAEDA 4 months ago

Gracefully handle invalid query parameters for custom fields (#35312).

Patch by Holger Just.

Revision 21055
Added by Go MAEDA 3 months ago

Add missing fixture to IssuesTest (#35312, #35500).

Patch by Yuichi HARADA.

History

#1 Updated by Holger Just 4 months ago

  • Related to Defect #35062: Back URLs with <t+ operator break added

#2 Updated by Holger Just 4 months ago

This patch probably masks the underlying issue in #35062 (by rendering a 404 instead of a 500 there). The root cause of this issue should probably still be checked.

#3 Updated by Go MAEDA 4 months ago

  • Target version set to 5.0.0

Setting the target version to 5.0.0.

#4 Updated by Go MAEDA 4 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

#5 Updated by Go MAEDA 3 months ago

  • Related to Patch #35500: Add missing fixture to IssuesTest added

Also available in: Atom PDF