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

fix: zimbraReverseProxyDnsLookupInServerEnabled false #118

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: 'attrs.xml'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14872,8 +14872,9 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @since ZCS 8.0.0
*/
Expand Down
5 changes: 3 additions & 2 deletions store/conf/attrs/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6983,8 +6983,9 @@ TODO: delete them permanently from here
</attr>

<attr id="1384" name="zimbraReverseProxyDnsLookupInServerEnabled" type="boolean" cardinality="single" optionalIn="server,globalConfig" flags="serverInherited" since="8.0.0">
<desc>Control whether force the server side do the DNS lookup and send the result IP back to proxy. If set false, the raw address configured (e.g. zimbraMailHost) is directly sent to proxy.</desc>
<globalConfigValue>TRUE</globalConfigValue>
<desc>Control whether force the server side do the DNS lookup and send the result IP back to proxy. If false, the raw address configured (e.g. zimbraMailHost) is directly sent to proxy,
else the translated IP will be sent back to the client.</desc>
<globalConfigValue>FALSE</globalConfigValue>
</attr>

<attr id="1385" name="zimbraFileAndroidCrashReportingEnabled" type="boolean" cardinality="single" optionalIn="account,cos" flags="accountInfo,accountInherited" since="8.0.0">
Expand Down
29 changes: 17 additions & 12 deletions store/src/java/com/zimbra/cs/account/ZAttrConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -56180,22 +56180,24 @@ public Map<String,Object> unsetReverseProxyDefaultRealm(Map<String,Object> attrs

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @return zimbraReverseProxyDnsLookupInServerEnabled, or true if unset
* @return zimbraReverseProxyDnsLookupInServerEnabled, or false if unset
*
* @since ZCS 8.0.0
*/
@ZAttr(id=1384)
public boolean isReverseProxyDnsLookupInServerEnabled() {
return getBooleanAttr(Provisioning.A_zimbraReverseProxyDnsLookupInServerEnabled, true, true);
return getBooleanAttr(Provisioning.A_zimbraReverseProxyDnsLookupInServerEnabled, false, true);
}

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param zimbraReverseProxyDnsLookupInServerEnabled new value
* @throws com.zimbra.common.service.ServiceException if error during update
Expand All @@ -56211,8 +56213,9 @@ public void setReverseProxyDnsLookupInServerEnabled(boolean zimbraReverseProxyDn

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param zimbraReverseProxyDnsLookupInServerEnabled new value
* @param attrs existing map to populate, or null to create a new map
Expand All @@ -56229,8 +56232,9 @@ public Map<String,Object> setReverseProxyDnsLookupInServerEnabled(boolean zimbra

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @throws com.zimbra.common.service.ServiceException if error during update
*
Expand All @@ -56245,8 +56249,9 @@ public void unsetReverseProxyDnsLookupInServerEnabled() throws com.zimbra.common

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
Expand Down
29 changes: 17 additions & 12 deletions store/src/java/com/zimbra/cs/account/ZAttrServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -40370,22 +40370,24 @@ public Map<String,Object> unsetReverseProxyDefaultRealm(Map<String,Object> attrs

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @return zimbraReverseProxyDnsLookupInServerEnabled, or true if unset
* @return zimbraReverseProxyDnsLookupInServerEnabled, or false if unset
*
* @since ZCS 8.0.0
*/
@ZAttr(id=1384)
public boolean isReverseProxyDnsLookupInServerEnabled() {
return getBooleanAttr(Provisioning.A_zimbraReverseProxyDnsLookupInServerEnabled, true, true);
return getBooleanAttr(Provisioning.A_zimbraReverseProxyDnsLookupInServerEnabled, false, true);
}

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param zimbraReverseProxyDnsLookupInServerEnabled new value
* @throws com.zimbra.common.service.ServiceException if error during update
Expand All @@ -40401,8 +40403,9 @@ public void setReverseProxyDnsLookupInServerEnabled(boolean zimbraReverseProxyDn

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param zimbraReverseProxyDnsLookupInServerEnabled new value
* @param attrs existing map to populate, or null to create a new map
Expand All @@ -40419,8 +40422,9 @@ public Map<String,Object> setReverseProxyDnsLookupInServerEnabled(boolean zimbra

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @throws com.zimbra.common.service.ServiceException if error during update
*
Expand All @@ -40435,8 +40439,9 @@ public void unsetReverseProxyDnsLookupInServerEnabled() throws com.zimbra.common

/**
* Control whether force the server side do the DNS lookup and send the
* result IP back to proxy. If set false, the raw address configured
* (e.g. zimbraMailHost) is directly sent to proxy.
* result IP back to proxy. If false, the raw address configured (e.g.
* zimbraMailHost) is directly sent to proxy, else the translated IP will
* be sent back to the client.
*
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
Expand Down