Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...7.02 Host Settings Error - SMTP Password Changed to Base64!7.02 Host Settings Error - SMTP Password Changed to Base64!
Previous
 
Next
New Post
12/13/2013 6:10 AM
 

--VERY POOR EXECUTION DNN---

So I can appreciate that DNN has made it very clear they are tailoring their Evoq Content Platform to service their biggest government clients and taking more notice to the security measures needed to protect content and users passwords within the system.  What frustrates me and I'm sure hundreds of other developers in the ecosystem is the way they have allowed new feature request demands to trump their dedication to backwards compatibility and upgrading.  I feel compelled to write this post (my first one by the way) because I'm sure there are others out there this has happened to and they might not even know it yet.

 I'm not entirely sure when they made the change to begin to store the SMTP password in the host settings, but it wasn't until the 7.02 upgrade that it literally brought my site to it's knees.  All this time, my SMTP password that is stored in the HostSettings table had been stored in clear text. I know this because I've had to go change it plenty of times when I would change the settings on my mail server as I'm sure many of you have as well.  If the settings were wrong or the password was wrong, I would get error messages in the log but the module attempting to send mail using the DNN settings would just continue as if the SendMail code was implemented in a TryCatch and the Catch did not Throw an exception that would halt the following steps.

In steps the 7.02 upgrade.  All of a sudden, I could not access my Host Settings which seemed weird, but upon investigation, it appears any function of my site that included some sort of email being sent...would halt the code and Throw an exception page with the error.  Hmmm...what could it be?

As it turns out, if the value stored in the SMTP password field in your HostSettings table was not encoded using a Base64 conversion the core code halted anytime this setting was accessed...INCLUDING THE PAGE USED TO MAKE THE HOST SETTING CHANGE!  Meaning, I could not load the HostSettings page because the core function to read the value in the DB had non-Base64 characters in it and instead of handling this error with some exception code block, they just assumed this field would never have any other values other than the proper encoding.  That meant that ANY code on my site that involved any sort of email function...registration, password reset, Schedule alerts, and any other calls to the Email functionality, the code would flat out halt.  Now consider this. There are a bunch of instances where the email call is not wrapped in any sort of SQL transaction so when the code fails, it leaves the session or in this case, the users action in a state that in many cases is unrecoverable.  I have been left with many abandoned registrations and subsequent sales because the users registration failed and then could not go back and register again because the username (email) had already been used but never updated the profile so they could never login.

There are about 4 other scenarios where this one simple oversight and lack of upgradability / backwards compatibility has left me spending hours trying to rectify the data issues on my site.  That was, after the 6 hours I spent trying to figure out what was actually going on.

So whats the take-away here?  I am hoping this post might resonate with the DNN team urging them not to pressure their development team into releasing new features if it is going to lesson the quality of the code.  Being a developer, I understand how Rapid Development directly affects the ability to write good code that will address fringe case scenarios, but come on. Requiring the password not to be stored in clear text is obviously a good thing but not allowing the code to continue if it is not is as unacceptable as taking the liberty to change my HTML input controls into Base64 images and setting the original controls to invisible.  You gotta love those new DNN checkboxes right?

So, if anyone else is having this problem, the only fix is to go to your HostSettings table and remove the password value all together and set the SMTPEnableSSL=N.  This will let you back into Host Settings where you can then reset your SMTP settings.

 

SMTPEnableSSL

 

SMTPEnableSSL

 
New Post
12/13/2013 11:01 AM
 
actually what happened is that in 7.2.0 we changed to storing the smtp password as an encrypted value. During upgrade, the upgrade script will read back the (clear-text) value, encrypt it and then store it. As all future reads decrypt the value this does not cause any issues. If you are getting a base-64 error it indicates that something failed during upgrade and the value was not decrypted (I know of one report where someone had the "module creator" module installed and an upgrade caused a failure). I will be fixing the module creator issue, and will also add some defensive code to the decryption routine so an exception returns an empty string (to cover any other upgrade issues)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
12/13/2013 2:32 PM
 

Sorry if my long post may have come across a bit harsh. I too had the module creator installed and saw that post as well.  Im not sure how that would have failed the upgrade but I did experience the same error sequence as the reported issue.  Do you really think that caused the SMTP password conversion to not run?

Either way, I think you guys are doing a great job but it seems to be clear the company has put new feature requests at such a high priority, you as developers are probably pressured into making deadlines that you cannot code to cover all contingencies. 

either way...thanks for the reply and the exception code block would be great.

 
New Post
12/13/2013 3:47 PM
 

Not at all, it's a big complex project so it can be difficult to be aware of all the changes.

As to the module creator, the issue is that we brought it into the product but it has the same name and you cannot have 2 packages with the same package name -I'm still considering how to fix it as the cleanest fix is to give the core version a new name (that doesn't clash with the old module) and during upgrade remove the "old" versions but that has the disadvantage of removing the module creator from any page it would be on (only the initial module creator page though - not any modules created for it). The other options aren't ideal either so we're still discussing (unfortunately as the issue occurs during upgrade when the module installs we have limited options)

Regarding the smtppassword, I've already fixed it - you can view the checkin @

 https://github.com/dnnsoftware/Dnn.Pl...


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
12/13/2013 3:52 PM
 

So do you think the failed ModuleCreator Install halted the process that had the SMTP Conversion code?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...7.02 Host Settings Error - SMTP Password Changed to Base64!7.02 Host Settings Error - SMTP Password Changed to Base64!


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out