kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

URL credentials for updates

Hi,
We host our updates on our website that requires logon credentials from our end users. So, I have questions about the Updater configuration projects where I have found that I have to use a convention such as this where the credentials are embedded in the URL to give the updater the information it needs to accomplish the downloads:

Code: Select all

http://<username>:<pwd>@www.myurl.com/<client>/downloads/setup.exe
It seems like this could be a bit of a security risk if the credentials are passed as clear-text. Is there some technical document that you can point me to that discusses in detail how the updater uses the credentials that are required when our downloads are stored on a password-protected website?

Also, are these credentials configurable at runtime?

Also, our credentials generally make use of a few non-alphanumeric characters and I think this might be throwing off the updater. When I configure those credentials in the Updater areas of the main project and the Configurations project, and I try to do a /justcheck with the Updater.exe I am finding that the return error code I am getting is -536870894 (or, E0000012). But I can't find any documentation which helps me to understand what those return codes mean.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: URL credentials for updates

Hello,
It seems like this could be a bit of a security risk if the credentials are passed as clear-text. Is there some technical document that you can point me to that discusses in detail how the updater uses the credentials that are required when our downloads are stored on a password-protected website?
We don't have a technical help file describing the background operations performed by our Updater, but mainly the Updater tool will only access this URL from your updates configuration file (hosted on your server) in order to download the Updates package. However, if you don't want to store the user credentials in the URL inserted in your updates configuration file, then you can use the short form for your updates URL:

Code: Select all

http://www.myurl.com/<client>/downloads/setup.exe
and, when the Updater tries to download the updates package it will prompt for credentials.
Also, are these credentials configurable at runtime?
No, the only way to enter the credentials at download time would be to use the short form for your updates URL:

Code: Select all

http://www.myurl.com/<client>/downloads/setup.exe
Also, our credentials generally make use of a few non-alphanumeric characters and I think this might be throwing off the updater. When I configure those credentials in the Updater areas of the main project and the Configurations project, and I try to do a /justcheck with the Updater.exe I am finding that the return error code I am getting is -536870894 (or, E0000012). But I can't find any documentation which helps me to understand what those return codes mean.
Please take a look on the "Updater return codes" of our "Auto Updater" article.

If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: URL credentials for updates

Hi Dan,
I have looked at those Updater return codes in that article but I don't see any reference to the return code of -536870894 (or, 0xE0000012). I may have found a problem with my code, so I will keep digging, but if you can let me know what 0xE0000012 represents for an error code that would be great.

With the long form of accessing our download website like this:

Code: Select all

http://<username>:<pwd>@www.myurl.com/downloads/setup.exe
What happens when the <pwd> value contains an "@" symbol? Or other symbols such as "$", or "-" or "_" or "+"? Will this work, or are there some restrictions on what ASCII chars can be used as the username and pwd values?

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: URL credentials for updates

Hello,
I have looked at those Updater return codes in that article but I don't see any reference to the return code of -536870894 (or, 0xE0000012). I may have found a problem with my code, so I will keep digging, but if you can let me know what 0xE0000012 represents for an error code that would be great.
Indeed, it seems the 0xE0000012 (-536870894) Updater exit code is not documented in our help files. Forwarding this to our development team it seems this exit code is used when the URL (of the updates configuration file or of the updates package) contains an invalid username or password (when authentication is needed). We will update the "Auto Updater" article with this exit code in a future version of Advanced Installer. Thank you for bringing this to our attention.
What happens when the <pwd> value contains an "@" symbol? Or other symbols such as "$", or "-" or "_" or "+"? Will this work, or are there some restrictions on what ASCII chars can be used as the username and pwd values?
If the username and password within your URL contain special characters, then you should replace them with their corresponding URL encoding characters. For example, the following URL:

Code: Select all

http://user@name:p$wd@www.myurl.com/downloads/setup.exe
should be escaped like this:

Code: Select all

http://user%40name:p%24wd@www.myurl.com/downloads/setup.exe
Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: URL credentials for updates

Hi Dan,
We tried the URL-encoding (or escape characters) as you suggested, but it doesn't seem to help.

For now at least we have changed the our credentials so that such characters are not used, and so the crisis is averted for now, but it would be nice to know that we can bring them back in the future. These days (higher security awareness) it would seem like everyone is making use of ASCII characters other than alphanumeric ones for their website credentials.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: URL credentials for updates

Hello,

I've tested the scenario and indeed I've replicate the behavior. It seems this behavior could be caused by an Internet Explorer 8 (or below ) limitation. Please take a look on "Internet Explorer does not support user names and passwords in Web site addresses (HTTP or HTTPS URLs)" article. So, if target machines have an IE 8 or below version then the Updater won't be able to use an URL containing the username and password embedded.

Currently our Updater is using IE API to access and download the updates file, therefore any HTTP(S) URL containing username and password credentials will be rejected by IE 8 (or below versions). As a workaround you can remove the username and password within your URL and, then the Updater tool will prompt you to enter credentials if the web site requires authentication.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kjullion
Posts: 176
Joined: Mon Nov 11, 2013 9:02 pm

Re: URL credentials for updates

Hi Dan,
I am glad you were able to replicate the problem. I just wanted to make sure too that you realize (and agree with my findings) that the behavior of including the "username:password" in the URL works fine normally, it is only if those credentials contain special characters (like the "@" sign for example) that we noticed there was this problem.

EDIT:
We really need the URL long-form method (i.e. with "username:password" in the URL) to work the way it does now, we can forgo the special characters which are much less important to us. If you were to force the prompt for credentials that would kill the silent auto update process which is the primary reason that we purchased AI.

Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: URL credentials for updates

Hello,
I am glad you were able to replicate the problem. I just wanted to make sure too that you realize (and agree with my findings) that the behavior of including the "username:password" in the URL works fine normally, it is only if those credentials contain special characters (like the "@" sign for example) that we noticed there was this problem.
Indeed, it seems that when embedding in the URL a special character the Updater fails to reach the related URL even on newer IE versions where the "Internet Explorer does not support user names and passwords in Web site addresses (HTTP or HTTPS URLs)" doesn't apply. This is an Advanced Installer issue and a fix will be available in our next version (11.6) of Advanced Installer. We'll notify you when the fix will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: URL credentials for updates

Hello,

The Updater have support to access HTTP(S) URL containing credentials embedded starting with the version 11.6 of Advanced Installer released on October 23rd, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
PavelRakowski
Posts: 5
Joined: Thu Apr 23, 2015 1:50 pm

Re: URL credentials for updates

Hello, jus ta question,
SHOULD I ENTER this url:http://<username>:<pwd>@www.myurl.com/< ... /setup.exe ALSO to "Updater.aip" in its "Updates --> Properties --> Main URL" path ??
OR only to a "config.aiu" ?
Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: URL credentials for updates

Hello Pawel,

You can add the related URL directly in your updates configuration project -> Updates -> Properties -> Main URL" field. When building the AIP project the URL it will be automatically inserted in the built AIU updates configuration file.

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”