Ticket #4843 (closed defect: fixed)

Opened 4 years ago

Last modified 1 year ago

post_process_request does not correctly pass content type

Reported by: onecreativenerd Assigned to: rjollos
Priority: normal Component: AccountLdapPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

AccountLdapPlugin blocks other plugins from changing the content type of their response. This was a problem for me and kept RevtreePlugin from rendering its SVG.

Here's a patch that fixes it:

Index: accountldap/accountldap.py
===================================================================
--- accountldap/accountldap.py (revision 5415)
+++ accountldap/accountldap.py (working copy)
@@ -53,12 +53,12 @@

     def post_process_request(self, req, template, data, content_type):
         if not req.remote_user or req.session.has_key('email'):
-            return template, data, None
+            return template, data, content_type
         uid = req.remote_user.lower()
         name, email = self._getUserAttributes(uid)
         req.session['name'] = name
         req.session['email'] = email
-        return template, data, None
+        return template, data, content_type
     #
     #----------------------------------------- INavigationContributor interface
     #

This issue was a blocker for our new install.

Attachments

Change History

12/13/11 17:58:54 changed by anonymous

Thanks for posting this. This also caused problems with the datefield plugin on my install

12/14/11 03:11:00 changed by rjollos

  • owner changed from clp to rjollos.
  • status changed from new to assigned.

12/14/11 03:20:10 changed by rjollos

I'll see about getting this committed to the repository, to avoid more reports like #9611 (closed as duplicate).

12/14/11 06:52:54 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

This patch was applied to the 0.12 branch in [5428]. The 0.11 branch has a README that says to use the 0.12 branch.


Add/Change #4843 (post_process_request does not correctly pass content type)




Change Properties
Action