Protocol handler with multiple arguments - html

I created an application to act as a protocol handler, the registry are set up according to http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx
Then in the webpage I have something like:
Test App
If I click the link, the app is launched and "testapp:arg1" is passed in as an argument.
Now I want to pass multiple arguments to the handler. I'm guessing in the "command" registry key, I would have "path_to_exe" "%1" "%2". However I can't figure out how to write the html link to supply multiple arguments.
Is it possible to pass multiple arguments? If so, how do I do it and are there differences between different browsers?

In Registering an Application to a URI Scheme, it says that
When a user clicks a link containing your custom URI scheme, Windows Internet Explorer launches the pluggable protocol handler registered for that URI scheme. If the specified open command specified in the registry contains a %1 parameter, Internet Explorer passes the URI to the registered pluggable protocol handler application.
which means, spaces will be handled as the character in the whole URI.

Related

What notification types are supported for changes.watch?

I'm trying to set up a file watcher on a particular folder in Google Drive. Unfortunately, webhooks won't satisfy our use case, so I'm trying to see if the API supports other methods of push-based change notifications (such as WebSockets). The docs for /changes/watch indicate that you can submit a type parameter as part of the request body:
https://developers.google.com/drive/v3/reference/changes/watch
But the possible values for type don't appear to be enumerated anywhere, and all I can find in examples is that they all set this to web_hook when requesting a web hook callback.
What are the allowed values of type? Is it just web_hook?
The only supported type as specified in Drive Push Notifications is :"web_hook":
A type property string set to the value web_hook.

How do chromiumapp.org extension redirects work for Google Chrome?

When you create a Chrome extension and want to use OAuth 2.0, you can use a https://<app-id>.chromiumapp.org/* URL and be therefore able to have remote servers hit your browser instance directly (answered before - for example https://stackoverflow.com/a/30613603/61239). Does anyone know, or is able to theorize on how this works? And are you able to target any request at your browser, or does this only work for OAuth 2.0?
This is handled by the WebAuthFlow class, whose purpose is the following:
Given a provider URL, load the URL and perform usual web navigation until it results in redirection to a valid extension redirect URL.
The provider can show any UI to the user if needed before redirecting to an appropriate URL.
When the server instructs the browser to redirect to a valid extension redirect URL, that URL is instead passed to the callback function provided to chrome.identity.launchWebAuthFlow.
The 'appropriate' URLs are hardcoded in web_auth_flow.cc:
static const char kChromeExtensionSchemeUrlPattern[] =
"chrome-extension://%s/";
static const char kChromiumDomainRedirectUrlPattern[] =
"https://%s.chromiumapp.org/";
So the special URL https://<app-id>.chromiumapp.org/* only works in the context of a WebAuthFlow of the chrome.identity API. Note that the mechanism is totally internal to Chrome. The URL is never requested.

how to pass object in webview.invokescriptasync windows 8.1

I need to pass one object from my App to webviews html page.
I know we can invoke function of webview's page uusing invokescriptasync and also pass data as parameter. but it takes only string as parameter.
object which I want to pass cannot be serialized. so I need to pass it as it is.
The app and the Webview run in isolated script contexts, thus you are limited to passing information as string properties of the args object given to invokeScriptAsync. This is by design for security reasons, with no means to bypass it; otherwise you open the potential for malicious code in a Webview to directly modify app objects.

Flash - How come I do not receive a security warning to allow cross-site requests?

I am using the URLLoader class to send data to a script that sends an email with that data; the URLLoader is also used to receive the return data on the status of the request. This email script is located on another domain (webscript.io, in this case; they host scripts written in LUA that can perform various functions when called). I don't want to have to get them to host a crossdomain.xml file, but when I visit the page to use the Flash app, I don't even get a security warning. Is that not the default action when there is cross-domain scripting in a Flash application without a crossdomain.xml file?
For your reference, here is the application: http://www.canadadocks.ca/build-dock-app/
The cross domain issues are specifically for data that your SWF is retrieving from other domains. So if you're sending data (via a HTTP POST/GET), then this is not a problem.
Also, unless you're using the debug player, you won't see the security exception that occurs.
There are also various things that will not trigger the exception: like downloading and displaying an image from another domain. However, if you then try to access the bitmap data of that image, you'll get the security exception (unless the crossdomain.xml permits it).
So it can depend on what you're retrieving and what you're doing w/the data you fetch.
If you're still curious, you should further explain what type of data you're retrieving and what you do with it. As usual, it's better to explain that with code than with words ;)

Deployed Applet Suddenly Not Working

I put together an applet that uploads images via as3httpclientlib to a servlet. The applet works fine in debug mode (through flash builder) and until today it worked when deployed.
From the servlet logs, it appears the servlet never receives the image(s) byte stream, therefore my hunch is the applet is not posting the multipart data.
Can anyone suggest what I should do next to find the cause of the problem?
I suppose you ran into problem described here:
In Flash Player 10 and later, if you
use a multipart Content-Type (for
example "multipart/form-data") that
contains an upload (indicated by a
"filename" parameter in a
"content-disposition" header within
the POST body), the POST operation is
subject to the security rules applied
to uploads:
The POST operation must be performed
in response to a user-initiated
action, such as a mouse click or key
press.
If the POST operation is
cross-domain (the POST target is not
on the same server as the SWF file
that is sending the POST request), the
target server must provide a URL
policy file that permits cross-domain
access.
So I think you should run your application using debugger and check Flex client logs for exceptions described above.