1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications
epriestley 6058d3305f Normalize remote IP addresses when writing to logs, etc
Summary:
Ref T11939. IPv4 addresses can normally only be written in one way, but IPv6 addresses have several formats.

For example, the addresses "FFF::", "FfF::", "fff::", "0ffF::", "0fFf:0::", and "0FfF:0:0:0:0:0:0:0" are all the same address.

Normalize all addresses before writing them to logs, etc, so we store the most-preferred form ("fff::", above).

Test Plan:
Ran an SSH clone over IPv6:

```
$ git fetch ssh://local@::1/diffusion/26/locktopia.git
```

It worked; verified that address read out of `SSH_CLIENT` sensibly.

Faked my remote address as a non-preferred-form IPv6 address using `preamble.php`.

Failed to login, verified that the preferred-form version of the address appeared in the user activity log.

Made IPv6 requests over HTTP:

```
$ curl -H "Host: local.phacility.com" "http://[::1]/"
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11939

Differential Revision: https://secure.phabricator.com/D16987
2016-12-05 11:20:29 -08:00
..
almanac Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
aphlict Discard stdout/stderr from the aphlict subprocess when running in daemon (normal) mode 2016-11-13 16:43:42 -08:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
auth Add session and request hooks to PhabricatorAuthSessionEngine 2016-11-17 13:09:29 -08:00
badges Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
base Allow logged-out users to load global preferences on installs without public viewers 2016-12-05 11:00:39 -08:00
cache Cache generation of the SSH authentication keyfile for sshd 2016-10-21 07:29:40 -07:00
calendar Set the viewer timezone properly on Calendar event RecurrenceSet objects 2016-12-02 07:29:48 -08:00
celerity Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
chatlog Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
conduit Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
config Add IPv6 reserved addresses to the default outbound blacklist 2016-12-05 11:20:13 -08:00
conpherence Use PhutilQueryCompiler in Phabricator fulltext search 2016-11-25 14:46:10 -08:00
console Remove "mysql.implementation" configuration 2016-11-22 04:15:34 -08:00
countdown Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
daemon Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
dashboard Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
differential Prettier file embeds 2016-11-27 14:57:06 -08:00
diffusion Improve error messages for running git clone against a Mercurial repository 2016-12-02 07:30:03 -08:00
diviner Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
doorkeeper Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
draft/storage Clean up some log spam caused by races in VersionedDraft 2016-09-05 13:01:53 -07:00
drydock Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
fact Update Facts for newPage 2016-04-03 15:07:52 -07:00
feed Prevent media from autoplaying when rendered as a feed story 2016-11-22 14:19:56 -08:00
files Prettier file embeds 2016-11-27 14:57:06 -08:00
flag Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
fund Consistently refer to 'Projects' as 'Tags' 2016-04-19 16:48:21 +00:00
guides Add a bunch of Phacility-specific code to the upstream, thinly veiled as generic code 2016-11-15 09:11:22 -08:00
harbormaster Allow "Wait for Message" to be unset on build plans 2016-11-22 14:02:37 -08:00
help Use "book" instead of "life ring" icon for global help menu 2016-10-28 14:33:18 -07:00
herald Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
home Revert "Clean up more Quicksand" 2016-10-01 12:58:30 -07:00
legalpad Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
lipsum Modularize content sources 2016-03-26 11:59:45 -07:00
macro Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
maniphest Strip restricted and incomplete handles from the "Mentions" tab on Maniphest tasks 2016-11-18 14:08:20 -08:00
meta Fix policy capitalization 2016-10-20 17:34:59 -07:00
metamta Make Herald test workflow modular and more clear 2016-08-03 16:12:33 -07:00
multimeter Add a cluster.read-only option 2016-04-09 13:40:47 -07:00
notification Add an icon to aphlict connection status 2016-10-02 08:17:21 -07:00
nuance Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
oauthserver Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
owners Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
packages Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
passphrase Make Passphrase "token" credentials accessible via the API 2016-11-15 09:12:35 -08:00
paste Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
people Normalize remote IP addresses when writing to logs, etc 2016-12-05 11:20:29 -08:00
phame Allow custom Sites to have custom 404 controllers 2016-11-30 15:25:09 -08:00
phid Strip restricted and incomplete handles from the "Mentions" tab on Maniphest tasks 2016-11-18 14:08:20 -08:00
phlux Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
pholio Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
phortune When a Phortune subscription has a removed payment method, be more explicit about it 2016-11-23 14:07:40 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
phrequent Redesign Config Application 2016-08-29 15:49:49 -07:00
phriction Fix Phriction document move on to existing document placeholder 2016-10-18 11:58:24 +00:00
phurl Don't send Phurl mail to the URL object itself 2016-11-15 09:12:15 -08:00
policy Fix some policy CSS 2016-11-11 13:43:13 -08:00
ponder Make "Core Applications" more reasonable 2016-08-12 07:57:59 -07:00
project Add sidenav back to workboards 2016-11-30 09:56:55 -08:00
releeph Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
remarkup/conduit
repository Don't let users pick "whatever.git" as a repository short name, make "." work 2016-11-21 15:47:20 -08:00
search When running a fulltext query with no query, enforce order by document creation date 2016-11-29 12:14:57 -08:00
settings Allow logged-out users to load global preferences on installs without public viewers 2016-12-05 11:00:39 -08:00
slowvote Prepare for event imports in Calendar 2016-10-12 10:45:31 -07:00
spaces Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
subscriptions Allow stacked comment actions to be explicitly ordered 2016-04-06 09:15:27 -07:00
support/application
system Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
tokens Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
transactions Ignore Calendar date edits which just change the internal date timezone without rescheduling it 2016-11-28 10:33:59 -08:00
typeahead Move testcase file to right place 2016-11-22 18:54:15 +00:00
uiexample Add setBackground to PHUIIconView 2016-08-19 13:19:53 -07:00
xhprof Removing deprecated method calls 2016-08-23 03:26:34 -05:00