view mod_flash_policy/README.markdown @ 4651:8231774f5bfd

mod_cloud_notify_encrypted: Ensure body substring remains valid UTF-8 The `body:sub()` call risks splitting the string in the middle of a multi-byte UTF-8 sequence. This should have been caught by util.stanza validation, but that would have caused some havoc, at the very least causing the notification to not be sent. There have been no reports of this happening. Likely because this module isn't widely deployed among users with languages that use many longer UTF-8 sequences. The util.encodings.utf8.valid() function is O(n) where only the last sequence really needs to be checked, but it's in C and expected to be fast.
author Kim Alvefur <zash@zash.se>
date Sun, 22 Aug 2021 13:22:59 +0200
parents ea6b5321db50
children
line wrap: on
line source

---
labels:
- 'Stage-Alpha'
summary: Adds support for flash socket policy
...

Introduction
============

This Prosody plugin adds support for flash socket policies. When
connecting with a flash client (from a webpage, not an exe) to prosody
the flash client requests for an xml "file" on port 584 or the
connecting port (5222 in the case of default xmpp). Responding on port
584 is tricky because it requires root priviliges to set up a socket on
a port \< 1024.

This plugins filters the incoming data from the flash client. So when
the client connects with prosody it immediately sends a xml request
string (`<policy-file-request/>\0`). Prosody responds with a flash
cross-domain-policy. See
http://www.adobe.com/devnet/flashplayer/articles/socket\_policy\_files.html
for more information.

Usage
=====

Add "flash\_policy" to your modules\_enabled list.

Configuration
=============

  --------------------- --------------------------------------------------------------------------------
  crossdomain\_file     Optional. The path to a file containing an cross-domain-policy in xml format.
  crossdomain\_string   Optional. A cross-domain-policy as string. Should include the xml declaration.
  --------------------- --------------------------------------------------------------------------------

Both configuration options are optional. If both are not specified a
cross-domain-policy with "`<allow-access-from domain="*" />`" is used as
default.

Compatibility
=============

  ----- -------
  0.7   Works
  ----- -------

Caveats/Todos/Bugs
==================

-   The assumption is made that the first packet received will always
    contain the policy request data, and all of it. This isn't robust
    against fragmentation, but on the other hand I highly doubt you'll
    be seeing that with such a small packet.
-   Only tested by me on a single server :)