Why Flex (flash) containing websites in HTTPS (SSL) shows mixed-content warning? - actionscript-3

My website uses html & Flex (sdk v. 4.6.0).
It must run only via HTTPS:// (SSL/TLS).
All the HTML links are prefixed with https:// (and even all other URLs).
The browser shows yellow warning
The symptom exists even when the Flex is reduced to virtually nothing (see below).
Plain HTML (without flex) has nice padlock icon, without warning signs.
(The SSL certificate was bought & installed yesterday, without EV. Server running Apache, browsers up-to-date: FF, Chrome, Chromium; OS: Windows & ubuntu)
I don't see any HTTP:// calls in firebug (or chromes' thing)
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Label text="Hello" fontSize="70" paddingLeft="10" paddingTop="10" />
</s:Application>
How can I force Flex to use HTTPS only? Is it a bug in Flex plugins?
Is there a way around it (besides thrashing adobe altogether, which is going to happen, but not just now)
Thanks!

Related

What are the technical advantages to running your app in Chrome Kiosk mode?

I am interested in knowing if there are any technical advantages/disadvantages to running a web app/site in kiosk mode.
I have heard from someone that running your site in kiosk mode gives additional permissions to your site to access files, write files,print etc. which could be useful for my site but I can't find anything online about technical differences between the two. I only managed to find info regarding session management and ways to "hack" kiosk mode.
Specifically I'd like to know about print functionality. I'd like to print a slip to a dot matrix printer without having to use a windows service. Important things to note are that this content should only be printed once, the built in PDF/web page functionality doesn't suffice as that allows multiple prints. So I would like to either track/limit the amount of prints printed.
Does anyone know of a list of the technical differences between normal- and kiosk mode for Chrome other than the fact that it show a page full screen and lock a user out of the device to a certain extent?
From what I found, you can not access file system in kiosk mode and there is not any special differences:
Kiosk mode does not have an accessible file system of any kind. All
elements accessed by Kiosk mode must be hosted by a remote web server.
The exception to this rule is in managed devices, or the Google Apps
for Work world. Signage licenses will allow more advanced options,
like caching files locally. You might want to look into those options,
as they're quite reasonably priced.
https://www.google.com/work/chrome/digital-signage/
But I also found, that you can automatically print using --kiosk-printing startup command.
Enable automatically pressing the print button in print preview.
Found on chromium site referencing to this list.
How to set it up? (Windows)
Check if you have setup your printer as default
Navigate to Chrome installation folder and create .bat script: chrome.exe --kiosk-printing --kiosk https://example.com
Try to print something, it should show print preview, but print it automatically
Sources:
https://www.pos-tpv.com/en/smartblog/7_enable-kiosk-silent-printing-for-google-chrom.html
https://productforums.google.com/forum/#!topic/chromebook-central/zv1nxWBAce4;context-place=forum/chromebook-central
i'm soory to drive you away from Chrome, but it's not off topic... The real benefit can be running Firefox in kiosk mode (example: running barebone linux with simple window manager; the Windows is option also, with little more work). With Firefox you can use XUL programming language, where HTML browser is just a component you combine with other components. So you can for example develop a custom keyboard (with buttons, links, emojis, etc), which the comunicates with firefox browser component, set's its url and so one. With Chrome you cannot achieve this in simple way, because it only support Extensions, where the main development is just inside browser (webpage). With XUl, you can really make your own "kiosk", with browser being one of the things to offer. So then you can for example:
check URLs user types,
provide your own behaviour for bookmarking,
overridde "back" functionality and so on.
override print functionality, provide your own print page etc ...
This has special uses where one can benefit the user, or strictly limit what end user can do with browser. Example of XUL code:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://gustinmi-kiosk/content/overlay.css" type="text/css"?>
<?xul-overlay href="chrome://gustinmi-kiosk/content/overlay.xul"?>
<window
id="main"
title="gustinmi-kiosk"
sizemode="maximized"
height="1024"
width="1280"
scrolling="no"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
class="blackbox"
>
<script type="application/x-javascript" src="chrome://gustinmi-kiosk/content/touchscreen.js"/>
<vbox id="navigator">
<hbox class="address">
<textbox id="omnibox" class="omnibox" type="autocomplete" value="" />
</hbox>
<hbox class="bookmarks">
<button label="Google" class="kioskKey" oncommand="kiosk.navigate('http://www.google.si/')"/>
<button label="Gmail" class="kioskKey" oncommand="kiosk.navigate('http://www.gmail.com/')"/>
<button label="GoogleMaps" class="kioskKey" oncommand="kiosk.navigate('https://maps.google.com/')"/>
<button label="Github" class="kioskKey" oncommand="kiosk.navigate('https://github.com/gustinmi')"/>
</hbox>
</vbox>
<vbox id="content" flex="1">
<!-- the instance of browser will be added here -->
</vbox>
</window>

Failed to load PDF document in Chrome

I have a PDF file stored on my server. I am unable to access the file using Google Chrome (or Ubuntu Chromium) via URL "sitename/pdfName.pdf"; while I am able to access the same PDF in Internet Explorer or FireFox without a problem.
Chrome is giving this error: "Failed to load PDF document"
Find attaching the error in this link Error Image.
We had object:none in our security policy inside web.config, that was causing chrome to refuse to open it, and pressing f12 in chrome and then click "console" shows the error message.
Changing web.config security policy to object:self fixed the problem
In our case we could open PDFs in firefox and IE but not in Chrome, so Chrome has a stricter implementation of the security policies.
The below is a suggested edit which I have not tested:
You may also find that Chrome has a problem with the header of the name: Content-Type value: charset=utf-8. Removing it may fix it.
Also, as you are testing this, make sure that cache is not interfering with the response by keep on changing the request URL to something new sitename/pdfName.pdf?val=1 and then with the next test, ?val=2 and so on...
When we encountered this problem, the only difference between PDF files that did and did not work was in the fist line of the PDF document itself.
Here's the difference between the old PDF that caused the error and the fixed version as seen in a binary-enabled text-editor (in this case vim -b):
Original PDF file:
%PDF-1.6^M%<e2><e3><cf><d3>^M
Fixed PDF file:
%PDF-1.6^M
%<e2><e3><cf><d3>^M
So the problem was solved at the source, no need to burden the victims with installing extra software or reinstalling chrome.
I don't know if this is a problem with the PDF generator, or with the chrome plugin.
According to the PDF specification the first line of a PDF document has to contain the PDF version, but it's not completely clear to me if the ^M is a valid line separator.
This might be due to Chrome’s built-in PDF Viewer not being able to open Firmex’s protected PDF document.
Try:
Opening Google Chrome (obviously)
In the top right, click More Untitled.png, then Settings.
At the bottom, click Show Advanced Settings.
Under Privacy, click Content Settings
Under PDF Documents, check the box next to "Open PDF files in the default PDF viewer application."
Once you have made the change, PDF files should open in Adobe Reader or Adobe Acrobat, rather than in Google Chrome.
Although it may not be ideal, it's a good alternative for now.
I had the same problem. In IIS I had to add this web.config file to my PDF folder to get it to work
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Content-Type" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
You may also find that Chrome (on Ubuntu 19.04) has a problem with the header of the name: Content-Type value: charset=utf-8.

xml/xsl not loading in IE11. Trying to forcing compatibility mode on xml/xsl page

I have a page that contains xml from an xsl document. It does not work on IE11 (the page is blank. when I view the source, the xml is there) but works on IE8. When I add the site to compatibility mode, this page works fine.
What I need to do is force compatibility mode on this page only. The ua-compatible meta tag has not effect. What can I do to force compatibility mode?
<%# taglib uri='http://java.sun.com/jstl/core' prefix='c' %>
<?x-ua-compatible content="IE=Edge"?> //does not work
<% response.setContentType("text/xml; charset=UTF-8"); %>
<?xml-stylesheet type="text/xsl" href="xsl/my_xsl.xsl"?>
<c:out value="${xmlDataFromRequest}" escapeXml="Y"/>
edit:
I have tried content="IE=EmulateIE8" and content="IE=8" but it doesn't work.
Microsoft has a knowledge base article on this.
Internet Explorer may not display local XML content
Symptoms
The XML document loads an XSL or XSLT style sheet from the local Windows file system.
Resolution
To resolve this problem in Windows 8.1, Windows Server 2012 R2, Windows 8, or Windows Server 2012, install the most recent cumulative security update for Internet Explorer.
Further reading
https://support.microsoft.com/en-us/kb/2974524
The issue turned out to be duplicate xml declarations in the document. IE8 seems to tolerate this where as ie9+ do not.
I was able to see the error message by doing F12 it said something like "xml declaration should be at the start of the document" it was at the start but there was a second declaration below it.
to fix it I simply removed the second declaration.

Windows phone 8.1 tiles issues

I am currently working on an application that was developed using windows phone 8.0 sdk and and i targeted it to work with Wp8.1 SDK. Everything is working fine, apart from the issue with tiles. For some reason, it is taking the WMAAppmanifest settings into consideration instead of the Package.appxmanifest file.
here's my Application tag in the Package.appxmanifest file,
<Applications>
<Application Id="xxxxxxxxxxxxxxxxxx" Executable="AGHost.exe" EntryPoint="/Views/SplashScreen.xaml">
<m3:VisualElements DisplayName="SampleUI" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="SyncUI" ForegroundText="light" BackgroundColor="#464646">
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png">
</m3:DefaultTile>
<m3:SplashScreen Image="Assets\Splashscreen.png" />
</m3:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="ScheduleSync.TimerTriggerTask">
<BackgroundTasks>
<Task Type="systemEvent" />
<Task Type="timer" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
The tile doesn't seem to change irrespective of what i change the image to be.
Am i looking at the right place? Is there some other place where i need to change the tiles ?
I had to change the tile in the WMAppmanifest instead of the Packageappxmanifest.
Here's the sample,
<Tokens>
<PrimaryToken TokenID="Token1" TaskName="_default">
<TemplateType5>
<BackgroundImageURI IsRelative="true" IsResource="false">Images\Cloud_WP8_71x71.png</BackgroundImageURI>
<Count>0</Count>
<Title>Sample Cloud</Title>
</TemplateType5>
</PrimaryToken>
</Tokens>
Double Click on the Package.appxmanifest in the Solution Explorer of your project. It will load up a GUI for updating the App manifest rather than using the xml versions.
In the GUI representation there will be a 'Visual Assets' Tab at the top which will let you set each of the different tiles.
Here is a link to a video of how to use the Package.appmanifest file. It also talks about hwo to set the tiles of the app. http://channel9.msdn.com/Series/Windows-Phone-8-1-Development-for-Absolute-Beginners/Part-8-Working-with-the-package-appxmanifest

Amazon S3 image, cannot be saved using html5 canvas, gives Tainted Canvases Error

Well having problems using canvas to save image in both(Chrome,Firefox and Safari),
When I load a hosted image in html5 canvas, an error is shown in canvas (though only in Chome not Firefox), the image is from Amazon S3 server:
Image from origin 'https://xxx.s3.amazonaws.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9015' is therefore not allowed access.
And when I try to save the canvas as image,
Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
Well yes, I have set the CORS config,
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
and
img.crossOrigin = 'something'
and I looked at Respond Proxy Js, but could not understand how to use it.
I have looked through a lot of SO posts and other references but can't solve the problem.Can anyone provide me with any solution.
#Update: if i change the line <AllowedOrigin>*</AllowedOrigin> => <AllowedOrigin>http://localhost:9015</AllowedOrigin>, the solutions seems to allow Chrome to save the canvas Image, but the problem is still persistent in Firefox and Safari
In firefox and IE your need to look like
<img src="https://platform3-preit-image.s3.amazonaws.com/components/fireside2.png" crossOrigin="anonymous" class="draggable-image" />
In chrome it need to be without crossOrigin. If you include crossOrigin attribute in chrome it will fail.
<img src="https://platform3-preit-image.s3.amazonaws.com/components/fireside2.png" class="draggable-image" />
So basically you need to render two different html output base on browser.