ejabberd_access_permissions crashes when OAuth is used

Hi,

I just installed Ejabberd 17.01 and have problems with OAuth2 authorization. Is it a problem with my configuration or ejabberd bug?

Error log:

2017-02-03 03:58:40.980 [error] <0.1293.0> gen_server ejabberd_access_permissions terminated with reason: no function clause matching ejabberd_access_permissions:'-matches_definition/5-fun-0-'({acl,{acl,admin}}) line 276
2017-02-03 03:58:40.980 [error] <0.1293.0> CRASH REPORT Process ejabberd_access_permissions with 0 neighbours exited with reason: no function clause matching ejabberd_access_permissions:'-matches_definition/5-fun-0-'({acl,{acl,admin}}) line 276 in gen_server:terminate/7 line 826

ejabberd.yml:

hosts:
  - "csrv"

.
.
.

  - 
    port: 5280
    module: ejabberd_http
    request_handlers:
      "/websocket": ejabberd_http_ws
      "/api": mod_http_api
      "/oauth": ejabberd_oauth
    ##  "/pub/archive": mod_http_fileserver
    web_admin: true
    http_bind: true
    ## register: true
    captcha: false

.
.
.

api_permissions:
  "console commands":
    from:
      - ejabberd_ctl
    who: all
    what: "*"
  "admin access":
    who:
      - admin
      - oauth:
        - scope: "ejabberd:admin"
        - admin
    what:
      - "*"
      - "!stop"
      - "!start"

Request:

curl -v -X POST -H "Cache-Control: no-cache" -H "X-Admin: true" -H "Authorization: Bearer Mx3vKxyEhFUQCqnMUCROguINc6GgAHGW" -d '[]' "http://127.0.0.1:5280/api/connected_users"

./ejabberdctl oauth_list_tokens

Mx3vKxyEhFUQCqnMUCROguINc6GgAHGW	admin@csrv	[<<"ejabberd:admin">>]	31273175 seconds

It seems a bug. A fix has

It seems a bug. A fix has been just committed, see here:
https://github.com/processone/ejabberd/commit/b703b4f022bbf450c8c21a51ef...

If you compiled from source code, you can make that simple change and try again.

It works now! Thank you.

It works now! Thank you.

Syndicate content