#210 Use absolute URL's in e-mail links

v1.0.0
closed
nobody
None
Mail
nobody
2015-08-20
2010-07-07
Anonymous
No

Originally created by: sf-overlords

Created by: mramm
Created date: 2010-04-09 15:13:30.748000
Assigned to:max

relative links obviously won't work

Discussion

  • Anonymous - 2010-07-07

    Originally by: sf-overlords

    Post by mramm:

    • status: pending → closed
     
  • Anonymous - 2010-07-07

    Originally by: sf-overlords

    Post by max:
    Do you think this could be handled in a general way? E.g. process body of all outgoing emails to find links starting with / to make them absolute? Does not sound like a viable idea.

    Which means that we need to review all existing code that uses forgemail.send_email to make sure it builds URL in a consistent and correct way.

     
  • Anonymous - 2010-07-07

    Originally by: sf-overlords

    Post by max:
    OK, I think I did it. Please review my work at mi/210.

    I added h.full_url() function to construct absolute urls. Also I updated notification code to add artifact urls automatically.

     
  • Anonymous - 2010-07-07

    Originally by: sf-overlords

    Post by max:
    I found two so far.

    forgewiki.reply / audit_reply (wiki_main.py) -- never used anywhere, looks more like a stub for the future.

    send_direct (notifications.py) -- used by Mailbox.fire code. The logic is a bit convulted: user code creates a Notification object using Notification.post() which is then looked up by Mailbox which is then sends an audit message to the queue where it is looked up by the code that does actual SMTP delivery (send_mail in common_react.py).

    Found four places in the code that uses Notification.post().

     
  • Anonymous - 2010-07-07

    Originally by: sf-overlords

    Post by max:
    The code has been merged to master a few days ago. Mark, please review and close the ticket.

     

Log in to post a comment.