Redmine mails "broken" since oAuth2 MS Office 365 integration - oauth-2.0

we are using Redmine version 4.x and 5.x (both tested with this issue).
We also use Redmine Helpdesk Pro as a plugin.
Since the change to oAuth2 for MS 365 integration we have the problem, that mails getting wired regarding the content.
For example (german text, but it shows the problem in generic)
Das Ganze=urde auf die URL api.example.com vorgenommen. Würden wir
=inen Fehler gegenüber der API haben, würden wir einen Status C=de 401 (unauthorized) oder 404 (not found)
There are always chars that get replaced by =.
The position of the = is in a range from col 64 to (last recent found) 75.
Even if i am calling Redmine to send in plaintext only, the email sent from Redmine has the = issue.
If i am checking the mail itself it seems to be sent in / as html mail. But the header seems to be correct (clicked into the message and selected Quelle anzeigen / show source) and the content is:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd"><html lang="en"><head> <meta
> http-equiv="Content-Type" content="text/html; charset=utf-8">
> <style type="text/css" media="screen">
> = </style> </head>
But sometimes it is a <br> and then a <br=> or even <br ?Die="" Abfragen=""
The last example includes even more text.
I already consulted the documentation of RedmineUp, also we got a "fix" for it, but it doesn't give any results.
So maybe someone of you had this issue too and got a solution?
Probably i have to change something in Azure Settings?

We had exactly the same case and problem with emails garbling.
We also use Redmine 4.2x and Helpdesk Pro plugin.
Our solution is to use OAuth Outlook for inbound helpdesk emails and smtp with basic auth for outbound helpdesk emails.
So we don't use default settings for OAuth Outlook outgoing mail server, we made separate configuration for it like so:
protocol: smtp
server: smtp.office365.com
port: 587
auth method:login
pass:
SSL and TLS
It works just fine and my understanding is that we don't need OAuth for SMTP for now, only for IMAP.
Hope it helps.

Related

ASP.NET_SessionId cookie not sent in request from IE browser for intranet site

When accessing an ASP.NET MVC application hosted on intranet from IE, the ASP.NET_SessionId is not sent in the request. This occurs on specific test serves. On our development serves hosting the same application, i see that the ASP.NET_SessionId cookie is sent.
Below is the difference i see form the network trace.
On the server that not working.
<entry>
<pageref>1</pageref>
<startedDateTime>2018-05-17T12:01:50.566+00:00</startedDateTime>
<time>188</time>
<request>
<method>GET</method>
<url>http://Server1/Content/Graphics/Cancel16.png</url>
<httpVersion>HTTP/1.1</httpVersion>
<cookies/>
<headers>
The on the server where the session key cookie is passed.
<entry>
<pageref>0</pageref>
<startedDateTime>2018-05-16T13:31:47.415+05:30</startedDateTime>
<time>31</time>
<request>
<method>GET</method>
<url>http://localhost/site/Content/Graphics/Cancel16.png</url>
<httpVersion>HTTP/1.1</httpVersion>
<cookies>
<cookie>
<name>ASP.NET_SessionId</name>
<value>14zbzcehugb2dvsq0axwo5ud</value>
</cookie>
</cookies>
<headers>
Why would the cookie information not sent on this server. I have verified the internet option privacy setting and they allow cookies, but what i understand is this affect mainly the internet sites.
Here you go Arvind.
Please note, this is just based on an old bug I experienced and might not be relevant to this exact case
My theory was re: something I came across a while ago using MVC3 and IE10/11.
Something to do with .NET not recognising the IE browser signature.
Add an App_Browsers folder in the root of your site then drop in BrowserFile.browser containing:
<browsers>
<browser refID="Default">
<capabilities>
<!-- To avoid wrong detections of e.g. IE10 -->
<capability name="cookies" value="true" />
<capability name="ecmascriptversion" value="3.0" />
</capabilities>
</browser>
</browsers>
...and everything works again. It was an IE specific issue.
Finally the problem was because of having a underscore'' in the host name setup for the application. The IE, seems to have problem when the host name is set with '', the IE prevents sending session cookies.
Answer from here helped me identify the issue

How to solve "500 server error" in Twitter card validater?

I am getting "500 internal server Error" from card validater Trying to validate my webpage.
I am using the following summary card in head section of my document
<meta name="twitter:card" content="$row['summary']" />
<meta name="twitter:site" content="#me" />
<meta name="twitter:title" content="$row['title']" />
<meta name="twitter:description" content="$row['description']" />
But it doesn't display summary card, I read the twitter card documentation , followed each staps and created a robot.txt file with the following contents :
User-agent:Twitterbot
Disallow :*
Allow :/webpage
But it still doesn't work. Card validater is returning the same error. My domain is on a free live server http://000webhost.com so I don't have access to the error.log life.
Can you help me solve this issue?
Is it an CMS or raw html/php? Sometime very slow host generate various error for Twitter Validator. I will suggest try using an internal link, that you could view properly, and the source shows all card meta properly. If you are using WordPress, I would have suggested using free plugin Twitter Cards Meta. It does all the coding part and direct you step by step for validation.

Spell checker in TWebBrowser (TEmbeddedWB) control

Internet Explorer 10 has built in spell checker and it works just fine. I tried to create a small HTML page to test it with following contents:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META name=GENERATOR content="MSHTML 10.00.9200.16721"></HEAD>
<BODY spellcheck=true contentEditable=true style="MARGIN: 0.5em">
<P>Theze ara mispeled wordz</P>
</BODY></HTML>
All that is needed is to put properties spellcheck=true and contentEditable=true.
I also tried adding <meta http-equiv="X-UA-Compatible" content="IE=10" /> e.g.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<META name=GENERATOR content="MSHTML 10.00.9200.16721"></HEAD>
<BODY spellcheck=true contentEditable=true style="MARGIN: 0.5em">
<P>Theze ara mispeled wordz</P>
</BODY></HTML>
For that matter, using IE=edge instead of IE=10 doesn't make any difference:
What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?
I then tried adding setting FEATURE_BROWSER_EMULATION to registry:
http://www.west-wind.com/weblog/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version
This improved rendering of certain elements which had CSS styles like border-radius so at least I could see it is in IE10 mode, but still no spell checker.
The above page works in Internet Explorer browser and spell check is working.
However, when same content is loaded into TWebBrowser (I use TEmbeddedWB but it is just the same wrapper anyway) it doesn't work.
After googling and googling for solutions, still haven't found one. Do you know is this even possible in WebBrowser control? I need the solution that would work on Windows 7 not just Windows 8. I've seen the registry entry FEATURE_SPELLCHECKING but it applies only to Windows 8.
Are there any alternative solutions that would work within DesignMode of TWebBrowser control? I am looking for curvy red underline thing like in Word or other programs and possible GUI window to offer alternative words.
I think you are out of luck here.
There was a bug report on Microsoft Connect concerning FEATURE_SPELLCHECKING and windows 7. Unfortunately it has been closed "as Designed".
This is the official answer from Microsoft:
Thank you for your feedback.
After additional review, the spelling feature is only supported on
Windows 8 and higher and is not supported on Windows 7. This is
because the spelling feature was built into the Windows 8 platform.
Best regards,
The Internet Explorer Team
try to change it in the registry...
Bye
Nicolas Perichon
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE Microsoft Internet Explorer Main FeatureControl
FEATURE_BROWSER_EMULATION
contoso.exe = (DWORD) 000090000
10001 (0x2711)Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.
10000 (0x02710) Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.
info de Microsoft:
msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation

Sending Text and HTML Emails - Why is Gmail Always Picking Text Version?

I'm sending some emails from my ASP.NET MVC application, using ActionMailer.NET.
Now, part of this process is sending both HTML and text versions of the message, to support text-only clients.
But what i'm seeing is that GMail is always picking the text version.
I tried Yahoo, and Yahoo is picking the HTML version correctly.
I tried dumbing down my HTML to nothing but a <h1> and a <span> tag, and GMail still picked the text version, which means there isn't a problem with the content of the HTML.
Is this expected behaviour?
Because when i send only the HTML version, GMail will show the HTML version correctly.
I've set the meta-tags in the HTML as follows:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Has anyone else encountered this behaviour, and found a solution?
Because as it stands, i'll probably have to send only the HTML version, so that GMail will render it, as too many of our clients use GMail.
Here's an example of basic HTML i'm trying to send:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body>
<h1>This is the heading</h1>
<span>This is some text.</span>
</body>
</html>
And GMail won't even allow that.
Most web-based clients and desktop email clients ignore anything in the <head> tag of an email.
To send both html and text versions, you will need to construct the mail message properly - have two mime chunks.
Show us the full code you are using to construct your email.
I guess the first thing i should have checked is the ActionMailer.NET issues.
I did some Googling, and it didn't come up.
This issue was fixed 2 days ago, so getting the latest package fixed the problem.
https://bitbucket.org/swaj/actionmailer.net/issue/23/multipart-mail-problem
That issue was actually relating to Thunderbird, but guess GMail has a similar way of handling multipart emails.
Problem solved!

ASP classic: String encoding

I encountered a really strange error yesterday when I refactored the start page of a old ASP classic web application.
But before I explain the problem I must explain how the website is built.
The web itself is made of ASP pages saved as ANSI windows 1252. The output sent to the browser I guess is encoded as codepage 1252, because no encoding is declared neither in the response header nor in the HTML HEAD tag.
The Problem:
When I refactored the login page (due to security issues) I did the following:
converted the ASP-file to utf-8
Added <%# Language="VBScript" #CODEPAGE=65001 %> to the top of the page
Added <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> to the HTML HEAD
The login page displayed nicely. But! The rest of the website now got encoding issues (when displayed on a web browser) on all pages (except the login page of course).
How can that be? I didnt change any other pages, and the encoding settings made in the login page should only affect that single page.
Please enlighten me. Please! :-)
Because the codepage is stored in the session and it is changing on the login page. If you clear cookies or open an incognito browser, the problem should go away until you return to the login page again.

Resources