[pmwiki-users] problem with https and includeurl

Petko Yotov 5ko at 5ko.fr
Tue Aug 16 00:41:51 CDT 2016


Indeed, I confirm that the documented way to include URLs on the same 
server doesn't work:

   (:includeurl /samplesite/path/page.html :)

The reason is that the target URL is processed by the MakeLink function 
in order to test if the external link is approved.

But if it is not an external link (http, https, ftp...) this function 
assumes it is an internal page link, and having more than one among "/" 
and "." would be an invalid page name, so it returns an empty string.

With the current includeurl.php, the loading of local resources is 
broken. You can use the full URLs.

A possible fix would be to replace "$url" with "$tgt" on lines 80 and 
88.

Petko

---
Change log     :  http://www.pmwiki.org/wiki/PmWiki/ChangeLog
Release notes  :  http://www.pmwiki.org/wiki/PmWiki/ReleaseNotes
If you upgrade :  http://www.pmwiki.org/wiki/PmWiki/Upgrades


On 2016-08-16 03:51, Byron Lunz wrote:
> I upgraded to the latest version 2.2.89 but still see the same problem.
> Using the latest includeurl.php file from pmwiki.org, I can include 
> only
> links which begin with http or https - not links to local files such as
> (:includeurl /update/file.php :)
> 
> Should links to files work (they used to), or do I need to edit all my
> links to full URLs??
> 
> 
> On Sun, Aug 14, 2016 at 5:54 PM, Byron Lunz <byronlunz at gmail.com> 
> wrote:
> 
>> Well, I spoke too soon. The new includeurl.php did indeed allow the
>> included https links to work, but various others which were only 
>> pointing
>> to files (e.g. "includeurl /update/some.php") stopped working.
>> 
>> On Sun, Aug 14, 2016 at 6:34 AM, Byron Lunz <byronlunz at gmail.com> 
>> wrote:
>> 
>>> Hi, Petko,
>>> 
>>> Thank you! Installing the latest version of includeurl.php did the 
>>> trick!
>>> 
>>> Byron
>>> 
>>> 
>>> 
>>> 
>>> On Sat, Aug 13, 2016 at 10:35 PM, Petko Yotov <5ko at 5ko.fr> wrote:
>>> 
>>>> Normally browsers will refuse to load resources from the "http" 
>>>> scheme
>>>> if the requesting page is on a "https" connection.
>>>> 
>>>> The current version of includeurl.php works fine with a "https" URL. 
>>>> On
>>>> your page it does not appear to be the case: even if you have in the 
>>>> source
>>>> "https", somehow it becomes "http" in the output.
>>>> 
>>>> Does it work for you with the latest version from here:
>>>> 
>>>>   http://www.pmwiki.org/wiki/Cookbook/IncludeUrl
>>>> 
>>>> Petko
>>>> 
>>>> On 2016-08-14 00:22, Byron Lunz wrote:
>>>> 
>>>>> My web site is implemented via pmwiki. We just installed a 
>>>>> LetsEncrypt
>>>>> cert
>>>>> to convert all accesses to https. Now, the forms which would 
>>>>> previously
>>>>> displayed using the includeurl directive no longer appear.
>>>>> 
>>>>> Chrome's developer console says:
>>>>> [image: Inline image 1]
>>>>> ... even after I have edited the includeurl from http to https. 
>>>>> I've
>>>>> also
>>>>> added a line of markup to config.php from the includeurl man page 
>>>>> which
>>>>> is
>>>>> supposed to allow https but so far no joy.
>>>>> 
>>>>> Page in question is https://www.cctomany.com/Info/ContactUs
>>>>> 



More information about the pmwiki-users mailing list