Project

General

Profile

Bug #2763

Setting REMOTE_USER with lua does not work

Added by flynn 6 months ago. Updated 5 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_magnet
Target version:
Start date:
2016-11-02
Due date:
% Done:

100%

Missing in 1.5.x:

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);

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

Associated revisions

Revision c74bdf83 (diff)
Added by gstrauss 5 months ago

[mod_magnet] fix magnet_cgi_set() set of env vars (fixes #2763)

(thx flynn)

x-ref:
"Setting REMOTE_USER with lua does not work"
https://redmine.lighttpd.net/issues/2763

History

#1 Updated by gstrauss 6 months 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.

#2 Updated by gstrauss 5 months ago

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

Also available in: Atom