Project

General

Profile

Actions

Bug #2763

closed

Setting REMOTE_USER with lua does not work

Added by flynn about 8 years ago. Updated almost 8 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_magnet
Target version:
ASK QUESTIONS IN Forums:

Description

Using a lua script for special authentication like this

lighty.req_env['REMOTE_USER'] = user

does not work, the recognized user is always REMOTE_USER.

Looking in the code of src/mod_magnet.c line 669 shows a typo that results in key = value:

        const_buffer key = magnet_checkconstbuffer(L, 2);
        const_buffer val = magnet_checkconstbuffer(L, 2);

The second line must pick the third argument from the lua stack:
        const_buffer key = magnet_checkconstbuffer(L, 2);
        const_buffer val = magnet_checkconstbuffer(L, 3);


Files

mod_magnet.patch (501 Bytes) mod_magnet.patch Fix typo in mod_magnet.c flynn, 2016-11-02 14:40
Actions #1

Updated by gstrauss about 8 years ago

  • Status changed from New to Patch Pending

Thanks, flynn. Bug was introduced in c354229f and released in lighttpd 1.4.40. Will be fixed in lighttpd 1.4.44.

Actions #2

Updated by gstrauss almost 8 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom