Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Forums / Cotonti / Core Labs / Archive / Redirect for page

Dayver
#1 2008-12-06 04:09
In a core there is such a great possibility: when in the field "text" of page there is such a construction
redir:your_url
when we attempt visit this page there will occur an automatic redirect to the specified URL (and counter increase page_filecount).

But I suggest to modify this piece of a code. And I would like to do it, because if you wish to make a redirect to an external URL, you will get an error because the kernel will try to convert it to an absolute URL automatically because of this:
SED_ABSOLUTE_URL

I suggest to remove it (constant SED_ABSOLUTE_URL) and to increase not only the counter page_filecount but also page_count. The first will allow to create an external redirect, and the second to keep the counter logically consistent.

But here there can be a hidden problems. If you have a plugin like autovalidation, eyoop or similar + some groups of users who can use them and are not reliable enough, they will have an opportunity of adding pages with redirects to dangerous sites (or just as SEO trick).

But the good reason to try solving this problem, without creating potential vulnerabilities for sites, would be an ability of making "link catalougue" sites easily without any special plugins.

What do you think of it? Personally I am interested in a solution of this problem. As I already have some ideas how to make it. But I need general approval of this feature.
Pavel Tkachenko aka Dayver. Гик и веб мастер который делает сайты, увлекается электроникой и очень любит смотреть кино.
О себе: Я злой и страшный серый волк, я в поросятах знааааюююю толк

Dit bericht is bewerkt door Trustmaster (2008-12-06 04:29, 11 jaren ago)
Trustmaster
#2 2008-12-06 20:09
Well, I think that this feature could be easily moved to a plugin. It would give these benefits:
[list=1]
  • Install this plugin only if you need this feature. Most of users will not need it for sure.
  • Set exact plugin permission to set what groups are allowed to add redirects.
  • May the Source be with you!
    Dayver
    #3 2008-12-07 01:11
    I very pity that do not wish to leave this feature in a core :cry
    Pavel Tkachenko aka Dayver. Гик и веб мастер который делает сайты, увлекается электроникой и очень любит смотреть кино.
    О себе: Я злой и страшный серый волк, я в поросятах знааааюююю толк