We have seen some cases where the user is trying to login to ColdFusion administrator console and CF keeps throwing login page again and again even though user has provided valid credentials. We heard users tried doing something like password reset, restarting the server which even didn’t helped solving the issue. So we were curious to find what causing this issue and will discuss some of the issues we came across that occur when attempting to log into the administrator console.
Before talking about some of these issues that we found we will see how ColdFusion admin login happens. During login the password entered in ColdFusion Administrator login console will be hashed using SHA-1 and then passed to the server for authentication. If the password entered is correct user will be able to successfully login to the admin console. The hashing related functions are present in sha1.js file which gets loaded when accessing CF admin console. Mostly the login issues occurs either the sha1.js file is not loaded or the browser is not executing any javascript. If either the SHA1.js file is not loaded or browser is not executing the javascript password will be transmitted in plain text (instead of hashed password) which results in login failure.
1) One instance where we have seen this issue because of IIS misconfiguration. IIS uses a default list of global MIME types to determine which types of content to serve. If a client requests a MIME type that is not defined on the Web server, IIS returns a 404 error. In this case IIS admin has created a specific web.config file for coldfusion site. If the coldfusion website specific IIS web.config file contains a duplicate mime type which is also present in the IIS global config mime type list it causes an error in IIS. There by IIS blocks all the file extensions (Except cfm and cfc as they were mentioned in IIS handler mappings). Because of this issue sha1.js file didn’t get loaded which in turn caused login failure. Removing/Commenting out the duplicate mime type from website specific web.config file resolves the issue.
For example:
Assume your website web.config file added additional mime types for file extensions .less and .ttf.
- <staticContent>
- <mimeMap fileExtension=”.less” mimeType=”text/plain” />
- <mimeMap fileExtension=”.ttf” mimeType=”text/plain” />
- </staticContent>
The above config causes an error because .ttf is already present in the IIS global web.config file. Remove the mimemap for file extension .ttf to resolve the issue.
2) Another instance where user is unable to login to ColdFusion Admin console using Internet Explorer. If IE is running enhanced security mode javascript on the page won’t be executed unless the website is added to the trusted sites list.
To add the ColdFusion website to the trusted list
- Navigate to Internet Options Menu
- Select security Tab and select trusted sites icon
- Click Sites button
- Enter ColdFusion website URL (e.g: http://hostname/) and Click add button
- Click Close button.
- Click Ok button to save the changes.
- Reload the webpage and provide your credentials you should be able to login to the admin console.
We will be keep updating this blog if we come across any other issues which prevents user from logging in to the admin console. Also, let us know if you have come across any admin login issues other than which are mentioned above.
Besides the login issue make sure to mandate that ColdFusion administrator runs only on https as specified in lockdown guide.
Links for ColdFusion lockdown guide
ColdFusion 11 lockdown guide ColdFusion 10 lockdown guide ColdFusion 9 lockdown guide