VYSPER
  1. VYSPER
  2. VYSPER-297

Accept client suggested resource names

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: connection handshake
    • Labels:
      None

      Description

      Modify Vysper so it will accept a client's suggested resource name at during resource binding. This includes performing a ResourcePrep on the suggested name and checking it for size (0-1023 characters). It should also limit the maximum number of resources that can be bound to a single bare JID.

      1. vysper-297.patch
        92 kB
        Mike Mahoney
      2. vysper-297-2.patch
        103 kB
        Mike Mahoney

        Activity

        Hide
        Mike Mahoney added a comment -

        I've made some additional changes to BindIQHandler.java. It now handles the three conflict policies outlines in http://xmpp.org/rfcs/rfc6120.html#bind-clientsubmit-error-conflict. The third scenario is more complicated than the first two, so any feedback on the implementation is welcomed.

        The second patch is a complete patch for VYSPER-297. The first patch file can be ignored.

        Show
        Mike Mahoney added a comment - I've made some additional changes to BindIQHandler.java. It now handles the three conflict policies outlines in http://xmpp.org/rfcs/rfc6120.html#bind-clientsubmit-error-conflict . The third scenario is more complicated than the first two, so any feedback on the implementation is welcomed. The second patch is a complete patch for VYSPER-297 . The first patch file can be ignored.
        Hide
        Mike Mahoney added a comment -

        I wanted to point out one change in the patch that isn't obvious. I modified org.apache.vysper.xmpp.modules.core.TestUser.createForSession(). Previously it was returning a new TestUser with a stored resource, but the entity that it stored did not have a bound resource. This would cause problems in testing when using the new ResourceRegistry API, since the new API requires Entities with bound resources instead of resource name Strings as parameters.

        The change required updates to some other tests as well, but everything seems to be working now.

        Show
        Mike Mahoney added a comment - I wanted to point out one change in the patch that isn't obvious. I modified org.apache.vysper.xmpp.modules.core.TestUser.createForSession(). Previously it was returning a new TestUser with a stored resource, but the entity that it stored did not have a bound resource. This would cause problems in testing when using the new ResourceRegistry API, since the new API requires Entities with bound resources instead of resource name Strings as parameters. The change required updates to some other tests as well, but everything seems to be working now.
        Hide
        Mike Mahoney added a comment -

        Patch to fix vysper-297. Includes updated unit tests.

        Show
        Mike Mahoney added a comment - Patch to fix vysper-297. Includes updated unit tests.

          People

          • Assignee:
            Bernd Fondermann
            Reporter:
            Mike Mahoney
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development