Skip to content

on-behalf-of header crashes server #473

Closed

Description

@melvincarvalho

When using WebID delegation, the on-behalf-of header is sent by the user agent. Currently this will crash node solid server.

It would be better to throw an error message, and keep the server running, or fix the delegation code in allow.js

https://github.com/solid/node-solid-server/blob/master/lib/handlers/allow.js

The root problem lies in the function :

function verifyDelegator (host, ldp, baseUri, delegator, delegatee, callback) {

Which takes 6 parameters. It is being called

verifyDelegator(req.hostname, delegator, req.session.userId, function

With only 4 parameters. Meaning that the callback is sent instead of the delegate URI. And the string function on the callback will throw an exception.

@dmitrizagidulin any ideas on what the logic should be here?

Activity

  1. dmitrizagidulin commented on Dec 19, 2016

    @dmitrizagidulin
    Contributor

    @melvincarvalho I'm not sure what the correct logic should be. Maybe @deiu can take a look?

  2. dmitrizagidulin commented on Dec 22, 2016

    @dmitrizagidulin
    Contributor

    Taking a look at this.

  3. dmitrizagidulin commented on Jan 24, 2017

    @dmitrizagidulin
    Contributor

    Fixed by PR #487. (WebID Delegation is currently not fully implemented in the server, but will be implemented by PR #475.) Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions