script-solution / Boardsolution

An open-source discussion board written in PHP.
GNU General Public License v2.0
6 stars 0 forks source link

[installation] Make the board-url validation less strict #52

Closed hrniels closed 11 years ago

hrniels commented 11 years ago

At least, http and https should be allowed. (see http://www.script-solution.de/community/support-board/posts_36_4259_1.html#b_23628)

Rafioso commented 11 years ago

The question is, if it is necessary at all, to check the protocol?

hrniels commented 11 years ago

Yes, probably it's enough to check whether it's a valid URL.

Rafioso commented 11 years ago

It should be checked like in the URL-BBCode or so.

hrniels commented 11 years ago

Looks good. This way, it's easier for the user and all important URLs are supported.

Rafioso commented 3 years ago

Link down. Here is the original text of the linked post:

ckragt hat folgendes geschrieben: Der Pfad lautet https://www.domain.tld/forum

Ah, ok. Es liegt daran, dass nur http:// bei der Installation als gültig gilt. Das sollte ich mal ändern. Ansonsten dürfte https keine Probleme machen. Du kannst das umgehen indem du Zeile 88,89 der install/module/3/helper.php: $check['board_url'] = FWS_String::substr($board_url,0,7) == "http://" && $board_url[FWS_String::strlen($board_url) - 1] != '/';

z.B. in:

$check['board_url'] = FWS_String::substr($board_url,0,8) == "https://" && $board_url[FWS_String::strlen($board_url) - 1] != '/';

änderst.

mfg Nils