Repository navigation
Conversation
|
Thanks for that. Can't remember if this will solve another potential problem that would have arisen if Apache httpd 2.5.0 ever actually made it to 2.6.0. An issue in 2.5.0 was that something was made into a private API which meant mod_wsgi would no longer compile and I could not see a solution. I think it was related to this but I am not sure. Anyway, I will look it over when I get a chance and see if I can work out what it was that was made private in 2.5.0 that made it impossible to compile mod_wsgi against that version. |
|
Totally unrelated to the Apache 2.5.x problems. #843 |
|
I am a little bit worried by the fact that The so not sure if they need to be done in conditional pre-processor branch where |
|
Seems like there are two options. First is to see if the mod_wsgi daemon process can call Second is to embed magic knowledge of how hook registration macros store stuff. So being naughty add access to |
|
The call Will need to test this rather than trust the AI. :-) |
|
This was definitely just about avoid future problems in 2.4.x if we extended And I think I needed to do the filter chain reset here exactly because |
Where the daemon process synthesises a request_rec for an incoming connection, delegate the allocation and field initialisation to ap_create_request() on the httpd versions that provide it, guarded by AP_MODULE_MAGIC_AT_LEAST(20120211, 106). That API exists so that modules building their own request objects pick up every field httpd expects to be initialised, avoiding the class of problem seen in CVE-2013-5704 when a new field is added. The hand-rolled apr_pcalloc() path is kept for older httpd. ap_create_request() runs the create_request hook, which is how the HTTP protocol filters get inserted on a request. The daemon writes its response in CGI script style for the Apache child process to parse, so those filters must not be present. The daemon process serves only daemon connections, so empty the create_request hook array through ap_hook_get_create_request() before the call, leaving the request with just the connection filters.
301a0fb to
77cfdc1
Compare
|
Passes |
Where the daemon process synthesises a request_rec for an incoming request, delegate the allocation and field initialisation to ap_create_request() in httpd 2.4.49+, guarded by
AP_MODULE_MAGIC_AT_LEAST(20120211, 106). This API was created specifically for the use-case here, to avoid future disasters like in CVE-2013-5704.