Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Querystring.php #431

Merged
merged 14 commits into from Jun 21, 2013
Merged

Querystring.php #431

merged 14 commits into from Jun 21, 2013

Conversation

norv
Copy link
Contributor

@norv norv commented May 20, 2013

Please review this PR, any comment (and in particular grumble!) are welcome.
It makes few, but quite relevant changes:

  • adds Request class for the request (which QueryString should kinda be!) and refactors cleanRequest() to use its methods. Splits general cleanup (cleanRequest()) from cleaning and initialization of widely used variables (Request, parseRequest()) and from set up of server variables needed (constructor of Request)
  • move a number of functions from QueryString.php to Util class, such as urldecode_recursive() in Util class. They were most unused in the code, but they might be good to have as utility functions. Updated them to no longer use $smcFunc.
  • Very relevant: security policy change: Elk no longer accepts PHP configurations where the (in)famous magic_quotes_gpc, or magic_quotes_sybase are on. If they are set, it dies with a message to the user: norv@224361d#L0R41
    They're deprecated in 5.3 and removed in 5.4. If you consider we should continue to handle these configurations, please do say. Ref: http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc.
  • Removed several $_SERVER variables usage through the code. Removed some custom ones, such as $_SERVER['BAN_CHECK_IP'], and also a few native ones. Their values are now cleaned, initialized and stored in a single place: by the Request object.

@joshuaadickerson
Copy link
Contributor

Great job. Querystring.php needed to be redesigned.

norv added 14 commits June 21, 2013 17:33
…p QueryString.php of magic quotes.

Signed-off-by: Norv <a.w.norv@gmail.com>
…tly used, but potentially useful...

Signed-off-by: Norv <a.w.norv@gmail.com>
…rely from QueryString.php..

Signed-off-by: Norv <a.w.norv@gmail.com>
… remove it from $smcFunc.

Signed-off-by: Norv <a.w.norv@gmail.com>
Signed-off-by: Norv <a.w.norv@gmail.com>
…ently client/ban ips and user agent, will hold http scheme.

cleanRequest() uses it.

Signed-off-by: Norv <a.w.norv@gmail.com>
Signed-off-by: Norv <a.w.norv@gmail.com>
…tibility

Signed-off-by: Norv <a.w.norv@gmail.com>
…sure board, topic, and other necessary vars are ready to use.

Signed-off-by: Norv <a.w.norv@gmail.com>
Signed-off-by: Norv <a.w.norv@gmail.com>
Signed-off-by: Norv <a.w.norv@gmail.com>
Signed-off-by: Norv <a.w.norv@gmail.com>
…-contained

unit of behavior.
Well in the measure accepting superglobals directly and filling globals counts as self-contained. :P

Signed-off-by: Norv <a.w.norv@gmail.com>
norv added a commit that referenced this pull request Jun 21, 2013
@norv norv merged commit 34bd7d6 into elkarte:master Jun 21, 2013
@Spuds
Copy link
Contributor

Spuds commented Jun 21, 2013

Awesomeness 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants