Don't rewrite non http URLs in bbcode

https://www.phpbb.com/ideas/
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Don't rewrite non http URLs in bbcode

Post by GanstaZ »

It is a relative path, that's why you get something(phpbb.com, your site, mine and whatever)/google.com. As mentioned above, it can be changed, but it doesn't smell as core implementation.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
Toxyy
Registered User
Posts: 950
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by Toxyy »

GanstaZ wrote: Mon Jun 04, 2018 8:52 pm It is a relative path, that's why you get something(phpbb.com, your site, mine and whatever)/google.com. As mentioned above, it can be changed, but it doesn't smell as core implementation.
But again, who in the world writes

Code: Select all

[url]google.com[/url] or [url=google.com]test url[/url]
, either of those, and means a relative path? I have never ever written google.com and intended some sort of local myurl.com/google.com. Not once.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
GanstaZ
Registered User
Posts: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Don't rewrite non http URLs in bbcode

Post by GanstaZ »

Well.. it's not about intended or not (right or wrong), it's just the way it is. It was explained what/why on a previous page & how to modify it, if needed.
Usus est magister optimus! phpBB pre-Triton & latest php environment.
When answer lies in the question, question becomes redundant!
User avatar
Toxyy
Registered User
Posts: 950
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by Toxyy »

GanstaZ wrote: Tue Jun 05, 2018 1:29 am Well.. it's not about intended or not (right or wrong), it's just the way it is. It was explained what/why on a previous page & how to modify it, if needed.
Understood.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
AmigoJack
Registered User
Posts: 6113
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by AmigoJack »

Toxyy wrote: Mon Jun 04, 2018 8:46 pmHave you ever written google.com and meant phpbb.com/google.com?
Toxyy wrote: Tue Jun 05, 2018 12:56 amwho in the world writes [url]google.com[/url] or [url=google.com]test url[/url], either of those, and means a relative path?
That's too short sighted - one may want to write exec.cgi, not just google.com. But what distinguishes both when you want to make a pattern out of it? Nothing. Hence, phpBB would need to explicitly know that whenever "Google" plus dot plus 2 or 3 letters (mind those using the localized version) is written it's meant as domain, not as text or relative URL. In contrast to "New Hype" plus dot plus com or any other yet unknown company name.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Toxyy
Registered User
Posts: 950
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by Toxyy »

AmigoJack wrote: Tue Jun 05, 2018 6:23 am That's too short sighted - one may want to write exec.cgi, not just google.com. But what distinguishes both when you want to make a pattern out of it? Nothing. Hence, phpBB would need to explicitly know that whenever "Google" plus dot plus 2 or 3 letters (mind those using the localized version) is written it's meant as domain, not as text or relative URL. In contrast to "New Hype" plus dot plus com or any other yet unknown company name.
Alright, how about certain domain endings can be in a non relative list, while certain file endings can be in a relative list?
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
AmigoJack
Registered User
Posts: 6113
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by AmigoJack »

You mean like command.com and file.java and pron.zip which can occur in both? Today we have this list to vaguely know which exist; tomorrow others can already exist.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Toxyy
Registered User
Posts: 950
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by Toxyy »

Well I don't think most people are trying to references relative path when using

Code: Select all

[url]
in the first place. But let's say they want to reference

Code: Select all

[url]command.com[/url]
as a relative path, along with the whitelisting idea, local files could be whitelisted as well.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
Elsensee
Former Team Member
Posts: 124
Joined: Sat May 07, 2011 11:04 am
Location: Hamburg, Germany
Name: Oliver Schramm
Contact:

Re: Don't rewrite non http URLs in bbcode

Post by Elsensee »

I've changed the status to "Invalid" as this won't really work. An URL should contain a scheme-part like "https://" or "ftp://" or "mailto:", if there isn't this is a hard problem for a computer to solve. Humans might know that "google.com" should go to https://google.com, but let's say you wanna access "access.sh", which is a valid domain but could also be a common file on file systems. You might not want to access it from a browser but there's really no easy way to decide there.

Btw, the way that @JimA proposed the change (make it only relative when there's a slash in front of it) wouldn't work either, because //google.com might also be something somebody wants to go to..

So we just go by the standard I guess.
Former Development Team Member
I don't make bugs - I make features
Post Reply

Return to “phpBB Ideas”