Page MenuHomePhabricator

Added a setup check for empty REMOTE_ADDR
ClosedPublic

Authored by jcox on Aug 25 2016, 4:32 PM.
Tags
None
Referenced Files
F14042962: D16450.id39566.diff
Tue, Nov 12, 7:06 AM
F13995679: D16450.id39568.diff
Wed, Oct 23, 2:44 PM
F13992629: D16450.id39566.diff
Tue, Oct 22, 5:51 PM
F13975221: D16450.diff
Oct 18 2024, 9:16 AM
F13972213: D16450.diff
Oct 17 2024, 5:45 PM
F13962025: D16450.id39566.diff
Oct 15 2024, 7:37 AM
F13961297: D16450.id39567.diff
Oct 15 2024, 4:18 AM
F13960174: D16450.id.diff
Oct 14 2024, 10:18 PM

Details

Summary

Fixes T8850. Previously, if a user's preamble script mangled $_SERVER['REMOTE_ADDR'] or somehow set it to null, the user would get errors when performing certain actions. Now those errors shouldn't occur, and instead the user will be warned that there is a setup issue related to their preamble script.

Test Plan

Create a preamble script that contains $_SERVER['REMOTE_ADDR'] = null; then navigate to /config/issue/. There should be a warning there about REMOTE_ADDR not being available.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jcox retitled this revision from to Added a setup check for empty REMOTE_ADDR.
jcox updated this object.
jcox edited the test plan for this revision. (Show Details)
epriestley added a reviewer: epriestley.
epriestley added inline comments.
src/applications/config/check/PhabricatorPHPConfigSetupCheck.php
212–221

This sort of fragment ("%s and double-check") may be difficult to translate into other languages, since they may want to change word order or need to adjust articles depending on noun gender.

A rephrasing that uses fewer fragments, maybe like this one, may be easier to translate in a natural-sounding way:

Consult the documentation (%s) and double-check....

Where the replacement is just a link titled "Configuring a Preamble Script".

(This is maybe-possibly slightly better for assistive technology / screenreader stuff too, since it makes "read all links on this page" more meaningful, although probably not too substantively.)

219

Just omit 'rel' -- we automatically manage it (currently, by adding 'noreferrer' to non-local links) and specifying it will override whatever behavior we're implementing.

(It's possible that we should change the behavior, e.g., to include noopener, although the use-window.opener-to-do-phishing-stuff attack doesn't currently seem hugely concerning to me. If you want to make an argument for changing the defaults, feel free to file a task.)

This revision is now accepted and ready to land.Aug 25 2016, 4:51 PM
jcox edited edge metadata.
  • Updated paragraph to be more translatable
jcox marked 2 inline comments as done.Aug 25 2016, 4:57 PM
This revision was automatically updated to reflect the committed changes.