2
Company Logo not mapping to https correctly
Question asked by George Ascione - 2/3/2016 at 10:05 PM
Answered
Running the latest v14.5, I have a redirect setup in IIS for all HTTP traffic to redirect to HTTPS.  When I upload a Company Logo, it correctly shows in my admin panel as: https://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png - Save and Preview brings up an optimal result of showing the logo.
 
When I browse to my login page, the logo is blank and in the source, it is now: http://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png - And the image doesn't carry through the redirect, rightfully so as linked images won't follow a redirect.
 
I can host the image on another site and link it in my custom HTML.  However, the Company Logo is overriding the Custom HTML and the login page continues to show: http://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png instead of my new URL - Yes, I've made sure I saved, restarted the services for no reason and still no different result.
 
Either I need a way to ensure it actually uses HTTPS or a way to remove the uploaded image so the custom HTML works.

15 Replies

Reply to Thread
3
Bruce Barnes Replied
We ran into the same issue with our logo and images initially.  Make certain that the location from which you are pulling the logo is accessed via a secure address.
 
More and more browsers are, by default, enforcing fully secure content on all encrypted pages.  It's now considered a "best practice." 
 
This is easily accomplished by placing a directory within the SmarterMail directory in the Program Files(x86)/SmarterMail/MRS/ directory 
 
We created a special folder within that director, for our customer's logos, and added them there, calling them via an HTTPS://securemail.chicagonettech.com/SPECIALDIRECTORYNAME/customerdirectory/image.EXT and it works perfectly, every time.
 
 - Bruce
Bruce Barnes ChicagoNetTech Inc brucecnt@comcast.net Phonr: (773) 491-9019 Phone: (224) 444-0169 E-Mail and DNS Security Specialist Network Security Specialist Customer Service Portal: https://portal.chicagonettech.com Website: https://www.ChicagoNetTech.com Security Blog: http://networkbastion.blogspot.com/ Web and E-Mail Hosting, E-Mail Security and Consulting
1
Matt Petty Replied
Employee Post Marked As Answer
As a temporary fix you can just add https instead of http in the HTML area, it should work. I put a bug on the buglist to fix this.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
This still appears to be broken. Bruce's suggestion does not work because the login form is overriding any attempt to change the URL to the logo. It is as if http://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png is hard coded. The Original poster mentioned this, and that he had tried to change the location where the image was hosted. Here it is from the OP in black and white:
 
"I can host the image on another site and link it in my custom HTML.  However, the Company Logo is overriding the Custom HTML and the login page continues to show: http://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png instead of my new URL - Yes, I've made sure I saved, restarted the services for no reason and still no different result."
 
I don't know why both answers suggest doing something he already stated does not work, but as Bruce pointed out - this is a serious issue. I can confirm the exact same behaviour. I have a folder with my logs in the root of C:\Program Files (x86)\SmarterTools\SmarterMail\MRS as Bruce suggested. However, when the page overrides your src= statement and changes it to http://xxxx.xxxxxxx.com/ImagesResourceHandler.ashx?file=2147483647.png no matter what you do, it doesn;t really make a difference.
 
Matt stated that he put in a bug. Has that gotten any traction? What is the status of the fix? It has been 8 months now. An update might be nice. Maybe the bug could be expedited since Matt's temporary fix is not a fix at all. I am using SmarterMail 15.3 Enterprise, so this issue has persisted through several versions now.
 
Thanks all.
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
Matt Petty Replied
Employee Post
So you are unable to change your HTML on the page? Nothing should overwrite anything in this HTML. So if you put your own URL to an image, it should stay that way.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
It is not, and as the op said, it no matter what I put in the src url for the image it always changes it to http://www.shastaemail.com:9998/ImagesResourceHandler.ashx?file=2147483647.png

The other odd thing here is the port number and that both the op and myself have the same filename for the .png file. That is not a random number, it is statically the same. Not only between removals and uploads of images in the form, but apparently between myself the person who originally posted this.

I don't know if he is using the built in web server or not, he didn't state it. I am using IIS.
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
Matt Petty Replied
Employee Post
So just to be clear, this is what your attempting to do and it is not working? I just wanna make sure because I am unable to replicate this.
https://www.carbonitex.net/Videos/changesrcdemo.mp4
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
Yes. Where you changed the source to https://i.vimeocdn.com/portrait... and then saved is what I am talking about.

The Login Display tab maintains the HTML in the entry field without an issue. But when I load the actual login form and inspect element on the image it is still http://www.shastaemail.com:9998/ImagesResourceHandler.ashx?file=2147483647.png

I have a little text saying welcome to ShastaEmail in the HTML, and it shows up just fine. It is just the URL to the image. No matter what I do with it it always changes to http://www.shastaemail.com:9998/ImagesResourceHandler.ashx?file=2147483647.png

I have cleared the browser cache. Tried different browsers. Used incognito windows. So it is not cached. Also, other changes to the HTML will take effect, just not the change to the image.

Here is my HTML:

<div id='companyinfo' style='max-width: 280px;'>
<br /><b>Welcome to the new Shasta Webmail!</b></center>
<br />
<center>
<br /><img style='max-width:240px;max-height:140px;' src='https://shastaemail.com/Logo/ShastaLogo_sm.png'; />
<br/>

</center>
<br />
</div>
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
John C. Reid Replied
Update: I completely changed the image served by the server.
 My HTML
<img style='max-width:240px;max-height:140px;' src='https://shastaemail.com/Logo/ShastaLogo_sm.png' />
 
What Loads
 
The image changes, so it looks like the new image. But the URL is rewritten to include a www subdomain, a 9998 port, and the  ImagesResourceHandler.ashx?file=2147483647. instead of my image. It looks right, but it is being served by an image handler that is breaking the https
 
In source it appears to be served like this:
<script type="text/javascript">
//<![CDATA[
if (top.location.href.indexOf("Login.aspx") == -1) {top.location.href = "Login.aspx";}InjectInfo("<div id='companyinfo' style='max-width: 280px;'> <br /><b>Welcome to the new Shasta Webmail!</b></center><br /> <center>        <br /><img style='max-width:240px;max-height:140px;' src='http://www.shastaemail.com:9998/ImagesResourceHandler.ashx?file=2147483647.png' />        <br/>            </center><br /></div>", "Shasta Webmail");WebForm_AutoFocus('ctl00_MPH_txtUserName');//]]>
</script>
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
Matt Petty Replied
Employee Post
Do you have any other custom html's setup? Are you doing this on a domain level or system level? If system level do you have a domain level that is overriding it?
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
This is at the system level. We don't don't allow the domain personalization. I would be happy to look anywhere that you think this could be coming from.

I noticed it seems the page initially loads something and then javascript quickly changes it to the wrong version. Where could that be coming from? I changed the entire HTML block to a tables layout just so changes were obvious. Despite what I said before about the text changing (I honestly thought I remembered trying that) that entire HTML block is being ignored, not just the image. Nothing I put in the HTML block does anything. I just needed a drastic enough code change to see that.
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
Matt Petty Replied
Employee Post
Nothing changes what is inside the HTML, interesting your changes aren't being reflected. Can you check the companyInfo.xml file, it's stored in the same directory as mailConfig.xml (C:\Program Files (x86)\SmarterTools\SmarterMail\Service)
see if it has your changes in it.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
<?xml version="1.0" encoding="utf-8"?>
<CompanyInfo>
  <CustomInformation>
    <HelpText>Webmail Help</HelpText>
    <HelpLink>http://shasta.com/new-webmail</HelpLink>;
    <HelpLinkEnabled>True</HelpLinkEnabled>
    <LoginText>Shasta Webmail</LoginText>
    <LoginTextEnabled>True</LoginTextEnabled>
  </CustomInformation>
  <LoginAreaConfig>
    <enabled>True</enabled>
    <LoginPageHtml>&lt;div id='companyinfo' style='max-width: 35px;'&gt; 
    &lt;table style='width:100%'&gt;
        &lt;tr&gt;
            &lt;td style='text-align: center;&gt;
                &lt;br /&gt;&lt;b&gt;Welcome to the new Shasta Webmail!&lt;/b&gt;
                &lt;br /&gt;
                &lt;br /&gt;&lt;img style='max-width:240px;max-height:140px;' src='https://shastaemail.com/Logo/Shasta-Com-Logo-250px.png' /&gt;
                &lt;br/&gt;
                &lt;br /&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
&lt;/div&gt;</LoginPageHtml>
    <logoImage />
  </LoginAreaConfig>
</CompanyInfo>
This is my newer table layout BTW
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
Matt Petty Replied
Employee Post
It's very weird that your html is not getting applied to the page correctly. It seems all correct, I'm not sure where else that HTML could be coming from. Has it always been like this for you? Does the http version work fine?
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
John C. Reid Replied
It has always been like this. I just got around to trying to do something about it. The same method (Custom CSS under personalization) works fine for delivering a https linked logo to the page. It is just the login form, you know, where people want to see the lock icon. I upgraded from 14.something to the current version last weekend. I kind of hoped that was going to fix it.

What is served on port 9998? Why is that even there? We are using IIS, but could I have forgotten to do something with the internal web server? I am befuddled.
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001
0
John C. Reid Replied
I am so sorry, I wish I could report what I changed.

After frantic changes to the HTML block, recycling the site in IIS, clearing browser cache, and pounding my head into the desk, all in a loop -- it is now working as expected.

I would love to report on what was broken. Alas, I cannot.

Here is what I finally ended up within my HTML block:

<div id='companyinfo' style='max-width: 350px;text-align: center;'>
<p>&nbsp</p>
<p><b>Welcome to the new Shasta Webmail!</b></p>
<img style='max-width:250px;max-height:73px;' src='https://shastaemail.com/Logo/ShastaLogo_sm.png'; />
<p>&nbsp</p>
</div>
John C. Reid / Technology Director John@prime42.net / (530) 691-0042 1300 West Street, Suite 206, Redding, CA 96001

Reply to Thread