Skip to content

Commit db108e3

Browse files
committed
Task #8667: Cleanup deprecated Redirection
1 parent c6658eb commit db108e3

File tree

3 files changed

+1
-45
lines changed

3 files changed

+1
-45
lines changed

builds/install/misc/firebird.conf

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,44 +1054,6 @@
10541054
#IpcName = FIREBIRD
10551055

10561056

1057-
# ============================
1058-
# Settings for Unix/Linux platforms
1059-
# ============================
1060-
1061-
# ----------------------------
1062-
# Remove protection against redirecting requests to other servers
1063-
#
1064-
# ***DEPRECATED*** ***DEPRECATED*** ***DEPRECATED***
1065-
#
1066-
# This feature was partially broken in Firebird 3 with early (in remote listener)
1067-
# user authentication. Not all plugins can be used with Redirection.
1068-
# No matter of that we did not receive related bug reports, i.e. it's unused.
1069-
# Therefore Redirection is declared DEPRECATED in Firebird 5 and will be removed
1070-
# in Firebird 6.
1071-
#
1072-
# ***WARNING*** ***WARNING*** ***WARNING*** ***WARNING***
1073-
#
1074-
# Ability to redirect requests to other servers was initially present
1075-
# in Interbase, but was broken by Borland in Interbase 6.0, when
1076-
# they added SQL dialects. Request redirection was fixed in Firebird 2.0,
1077-
# but today such behaviour (proxy) seems to be dangerous from security
1078-
# point of view. Imagine, you have one carefully protected Firebird server,
1079-
# access to which is possible from global net. But in case when this server
1080-
# has access to your internal LAN (may and should be restricted,
1081-
# but often possible), it will work as a gateway for incoming requests like:
1082-
# firebird.your.domain.com:internal_server:/private/database.fdb
1083-
# It's enough to know name/IP of some internal server on your LAN, and for
1084-
# this connection, one even need not know login/password on external server.
1085-
# Such gateway easily overrides firewall, installed to protect your LAN
1086-
# from outside attack.
1087-
#
1088-
# DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.
1089-
#
1090-
# Type: boolean
1091-
#
1092-
#Redirection = 0
1093-
1094-
10951057
# ----------------------------
10961058
# Settings for Architecture Configuration
10971059
#

src/common/config/config.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ enum ConfigKey
150150
KEY_TRACE_DSQL,
151151
KEY_LEGACY_HASH,
152152
KEY_GC_POLICY,
153-
KEY_REDIRECTION,
154153
KEY_DATABASE_GROWTH_INCREMENT,
155154
KEY_TRACE_CONFIG,
156155
KEY_MAX_TRACELOG_SIZE,
@@ -252,7 +251,6 @@ inline constexpr ConfigEntry entries[MAX_CONFIG_KEY] =
252251
{TYPE_INTEGER, "TraceDSQL", true, 0}, // bitmask
253252
{TYPE_BOOLEAN, "LegacyHash", true, true}, // let use old passwd hash verification
254253
{TYPE_STRING, "GCPolicy", false, nullptr}, // garbage collection policy
255-
{TYPE_BOOLEAN, "Redirection", true, false},
256254
{TYPE_INTEGER, "DatabaseGrowthIncrement", false, 128 * 1048576}, // bytes
257255
{TYPE_STRING, "AuditTraceConfigFile", true, ""}, // location of audit trace configuration file
258256
{TYPE_INTEGER, "MaxUserTraceLogSize", true, 10}, // maximum size of user session trace log
@@ -563,9 +561,6 @@ class Config : public RefCounted, public GlobalStorage
563561
// GC policy
564562
CONFIG_GET_PER_DB_STR(getGCPolicy, KEY_GC_POLICY);
565563

566-
// Redirection
567-
CONFIG_GET_GLOBAL_BOOL(getRedirection, KEY_REDIRECTION);
568-
569564
CONFIG_GET_PER_DB_INT(getDatabaseGrowthIncrement, KEY_DATABASE_GROWTH_INCREMENT);
570565

571566
CONFIG_GET_GLOBAL_STR(getAuditTraceConfigFile, KEY_TRACE_CONFIG);

src/remote/client/interface.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8686,8 +8686,7 @@ static bool get_new_dpb(ClumpletWriter& dpb, const ParametersSet& par, bool loop
86868686
* Analyze and prepare dpb for attachment to remote server.
86878687
*
86888688
**************************************/
8689-
bool redirection = Config::getRedirection();
8690-
if (((loopback || !redirection) && dpb.find(par.address_path)) || dpb.find(par.map_attach))
8689+
if (dpb.find(par.address_path) || dpb.find(par.map_attach))
86918690
{
86928691
status_exception::raise(Arg::Gds(isc_unavailable));
86938692
}

0 commit comments

Comments
 (0)