Closed (fixed)
Project:
Drupal 6 Long Term Support
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 May 2012 at 16:01 UTC
Updated:
14 Jul 2021 at 18:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pwolanin commentedHere's a simple fix to ignore the 'q' param if it's not a string.
Comment #2
gregglesGiven the history of problems with Drupal responding to URLs it shouldn't...perhaps the answer should be to 404 in this case?
Comment #3
pwolanin commentedWell, I can put in any number of query params that Drupal ignores, so I think ignoring it is a reasonable reaction here. Short of casting to the string 'Array' I don't see any easy way to throw a 404.
Comment #4
gregglesFair point. Thanks.
Comment #5
David_Rothstein commentedThanks! Committed to 7.x: http://drupalcode.org/project/drupal.git/commit/da11da0
This could potentially be backported to Drupal 6.
Comment #6
albert volkman commentedNot sure if this is the proper place to test this?
Comment #7
gregglesI don't think it needs tests.
Comment #8
albert volkman commentedEh, I meant test as in testing the value with the in_string() method.
Comment #13
dsnopekThis issue is apparently still reported by security scanners as CVE-2012-2922, so it probably makes sense to address. That said, this is a pretty minor issue.
Comment #14
roderikThis patch is clearly safe / without side effects.
Plus it is growing a little 'less minor', because a request with ?q[]=x will now cause a
Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in ...on PHP8 with unpatched code.Comment #15
izmeez commentedWe have used the patch in #6 on sites for a long time now.
Comment #16
dsnopekThanks!
Committed:
https://github.com/d6lts/drupal/commit/93769a5ec6f9f2f4e958ee755f5f8a58e...