Project

General

Profile

[Solved] request_content_queue->first null in mod_auth_ticket in lighttpd version 1.4.52

Added by vardhaman about 5 years ago

We migrated from lighttpd 1.4.35 to 1.4.52 version recently. We have modified the mod_auth_ticket.c according to our project for having external login page. So whenever we submit the form data after entering credentials , we extract the form content using request_content_queue, then later authenticate the user.
After migrating to lighttpd 1.4.52 , we are receiving request_content_queue->first as null. We should be getting the credentials as "login=login&passwd=password" format.

Code snippet:

if (con->request.content_length && con->request_content_queue && con->request_content_queue->first) {
         chunk *req_chunk = con->request_content_queue->first;
         if (req_chunk->type == MEM_CHUNK && req_chunk->mem->used)
        {
             buffer *p_form_content = buffer_init_buffer(req_chunk->mem);
            if (p_form_content)
            {
                buffer_urldecode_query(p_form_content);
                DEBUG("s", p_form_content->ptr);
            }
        }
  ...............
}

Please let me know the way we receive data in lighttpd 1.4.52 is changed or is it the same. What i mean to say is are we receiving the data in read_queue instead of request_content_queue in 1.4.52?.

OS: linux 32 bit
Version : lighttpd 1.4.52
Client: Browser Chrome/Internet Explorer 11


Replies (2)

RE: [Solved] request_content_queue->first null in mod_auth_ticket in lighttpd version 1.4.52 - Added by gstrauss about 5 years ago

There have been over 1150 commits between lighttpd-1.4.35 and lighttpd-1.4.53. Yes, many things have changed, including request body handling, which is now deferred until a dynamic backend (cgi, fastcgi, scgi, proxy, etc) gets ready to process the request body. You can go look at some of those modules to see how they trigger reading of the request body.

Please note:
  • You have posted to the support forum with questions about development. There is a development forum. (and I have moved this post to the dev forum)
  • You have posted asking for (tangential) support for a third-party module. Sorry, any guidance will likely be limited.

Now that that is out of the way, please go look at #426. I recently posted some code there that you might find useful.
There are some serious limitations to mod_auth_ticket.c. Please do not ask for further support on it. There will likely be none.

RE: [Solved] request_content_queue->first null in mod_auth_ticket in lighttpd version 1.4.52 - Added by shivasn almost 5 years ago

we added this code.

handler_t r = connection_handle_read_post_state(srv, con);
if(r != HANDLER_GO_ON) return r;

With this, form data submitted from IE was available in con->request_content_queue;

we had to do this for IE. But, in case of chrome, data was always available at con->request_content_queue; even before calling handler_t r = connection_handle_read_post_state(srv, con);

    (1-2/2)