[Zope-CMF] SSLAbsoluteURL bug with CMF

Farrell, Troy troy.farrell@wcg.com
Tue, 29 May 2001 15:52:58 -0500


Well, it doesn't have the same difficulty outside CMF :(
see:
https://www.studyshare.net/dev/basepathtest
https://www.studyshare.net/dev/folder1/basepathtest
https://www.studyshare.net/dev/folder1/folder2/basepathtest

I think something else is up.  I read the SSLAbsoluteURL source and I
haven't found any tinkering with anything but absolute_url().  I'm not
familiar enough (yet) with CMF to say the same.

-----Original Message-----
From: Tres Seaver [mailto:tseaver@palladion.com]
Sent: Tuesday, May 29, 2001 1:15 PM
To: Farrell, Troy
Cc: zope-cmf@zope.org; rbickers@logicetc.com
Subject: Re: [Zope-CMF] SSLAbsoluteURL bug with CMF


On Tue, 29 May 2001, Farrell, Troy wrote:

> Has anyone seen this bug when using CMF with SSLAbsoluteURL?  I asked Ron
> (who wrote SSLAbsoluteURL) and he had no idea.  It appears as though the
> image URLs are being created by taking absolute_url() and slicing it.  You
> can observe the bug in action at
> https://www.studyshare.net/studyshare/testnews1.  Any suggestions are
> welcome.  Please copy me as I am not on the list.

The offending bit of HTML (from "View Source" on that page) is::

   <tr class="GuestActions">
     <td class="ActionTitle">
       <img src="/httpsyshare/newsitem_icon.gif" align="left" alt="News
Item" />
                            testnews1
     </td>
  </tr>

Note that this is *not* an absolute url, but a relative one;
assuming you haven't customized anything, the DTML which
generates it is:

  <tr class="&dtml-AuthClass;">
   <td class="ActionTitle">
    <dtml-let getIcon="_.hasattr(obj, 'getIcon') and obj.getIcon()"
              icon="getIcon or _.getattr(obj, 'icon', '')"
              typ="_.getattr(obj, 'Type', '')"
              objID="obj.getId()"
    >
      <dtml-if icon>
      <img src="&dtml-BASEPATH1;/&dtml-icon;" align="left" alt="&dtml-typ;"
/>
      </dtml-if>
      <dtml-var objID size=15 html_quote>
    </dtml-let>
   </td>
  </tr>

I don't know why SSLAbsoluteURL would be munging BASEPATH1,
but I don't think CMF is doing anything too strange here.
We might tweak it to produce genuine absolute URLs instead.

Tres.

> -----Original Message-----
> From: Ron Bickers [mailto:rbickers@logicetc.com] 
> Sent: Tuesday, May 29, 2001 1:51 PM
> To: Farrell, Troy
> Subject: RE: SSLAbsoluteURL bug I think.
> 
> > If SSL is defined as a property inside a CMF Portal and is 1,
> > https replaces
> > the first 4 characters of the portal name, but only for images:
> >
> > https://www.studyshare.net/studyshare/newsitem_icon.gif
> > becomes
> > https://www.studyshare.net/httpsyshare/newsitem_icon.gif
> >                            ^^^^^
> >
> > Have you seen this anywhere?  I haven't found a fix yet, but I
> > think the bug
> > could be with CMF ?!?!  Now I'm really confused :(
> 
> I haven't seen this and you're the first to point it out.  I have no
> experience with CMF, so unfortunately I don't even know where to begin.
> Perhaps CMF is using absolute_url in some interesting ways, causing
> SSLAbsoluteURL to behave badly.  Let me know if you get any suggestions
from
> the CMF crew.
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests
> 
> 

-- 
===============================================================
Tres Seaver                               tseaver@palladion.com