resmo opened a new issue #2733: invalid consoleproxy domain after upgrade from 
4.5 to 4.11.1
URL: https://github.com/apache/cloudstack/issues/2733
 
 
   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and master branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   Avoid a pitfall after upgrade from 4.5 to 4.11 using invalid domain with `*` 
for console proxy url
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
    * Improvement Request
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   gloabl setting
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master 
branch.
   -->
   
   ~~~
   4.11.1
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   N/A
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   N/A
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   When used a setting in 4.5 for consoleproxy.url.domain with `*` which got 
transformed to the "console IP with dashes + domain" and enabled SSL:
   
   ~~~
   *.example.com --> https://1-2-3-4.example.com
   ~~~
   
   However, in 4.11 (at least) there is a separate config to enable SSL, When 
upgrading from 4.5 the new setting consoleproxy.sslEnabled is defaulted to 
false. 
   
   In this case the domain is used "as-is" having a `*`and results in a invalid 
domain. This PR fixes it to always replace the `*`with the IP with dashes no 
matter if SSL is enabled or not. 
   
   ~~~
   *.example.com --> http://*.example.com
   ~~~
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   set global settings as the following:
   * consoleproxy.url.domain=*.example.com
   * consoleproxy.sslEnabled=false
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   Always use the valid domain by repalce * or use console IP
   ~~~
   consoleproxy.sslEnabled=false
   *.example.com --> http://1-2-3-4.example.com
   ~~~
   
   ~~~
   consoleproxy.sslEnabled=true
   *.example.com --> https://1-2-3-4.example.com
   ~~~
   
   ##### ACTUAL RESULTS
   
![selection_183](https://user-images.githubusercontent.com/23809/42401316-584fc75a-8175-11e8-9ba6-10abe72d2f59.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to