SàT progress note 2019-W17

goffi 5 years ago jabber-xmpp-en SàT project libre SàT progress

Hello,

this week I've had little time to work on SàT : thanks to the extended easter week-end, I've had a break.

I did manage to work a bit on the file sharing service, still focusing on the photo album. As I've explained last week, file sharing can be used directly from device to device (e.g. retrieving pictures taken on a mobile phone from desktop computer), or with a server-side service.

XMPP allows to create "components" which can be seen as generic plugins to create services on the server (generic in the way that it's not tied to a specific server implementation, but can be used with anyone implementing XEP-0114). Starting with the incoming v0.7, SàT can be used as a component, and file sharing is the first one.

Until now, it was only used to store personal data, so the files could be accessed with the jid of the component. For instance, if your server is example.net your file sharing component may have the jid files.example.net. To access photo albums, we need the path of the album (e.g. /photos/week-end) which is set in the node attribute in XEP-0329, so you can request files.example.net to retrieve your files (i.e. photo album) from /photos/week-end.
Problem: if Louise is connected to files.example.net and wants to access /photos/week-end, she will get her own album. How to do if she wants to access the one of Pierre?

That's were the local part is used, i.e. the part before the @ in a jid. The files.example.net component will receive all traffic sent to any jid finishing with @files.example.net. So when Louise wants to access Pierre files, she can use pierre@files.example.net instead of just the domain name. That's what I've implemented this week. By using just pierre, the component will associate this with its own server (i.e. example.net), and will look for files from pierre@example.net (and check which ones Louise can access).

But what for people with an account outside of example.net, for instance what if file sharing service allows nestor@example.org to store files? Louise can't request nestor@files.example.net because it would get the files of nestor@example.net (note the .net insteaf of .org , it's a different user). To allow to retrieve the files of an external account, we should be able to use a full jid in the request, but it's forbidden to use @ in local part of the jid.

That's where XEP-0106 is used, it allows to escape a jid to do exactly that. I've implemented that so Louise can request nestor\40example.org@files.example.net to retrieve files from nestor@example.org. Don't worry for the complicated address, the end-user should not have to type it herself.

Last but not least, I have also fixed the margin issue with paragraphs and added missing Atom feeds links, it should hopefully be more confortable to read this blog.

To summarize, during this short week I've implemented a way to retrieve files from an other user in file sharing component, I've implemented XEP-0106, I've fixed a small CSS issue on the blog and I've added missing links for Atom feed.

E

edhelas 5 years ago