Comments (35)
Obviously the dot issue will need to be fixed. And personally I don't think we should be as strict on validation, especially in terms of www. Many websites are subdomains and people don't really expect to have to put the www in :P
from mybb.
Note this occurs in the stable branch too.
from mybb.
Hm. The issue seems to be related to this block in inc/datahandlers/user.php:
// Does the website start with http(s)://?
if(!validate_website_format($website))
{
$this->set_error('invalid_website');
return false;
}
Thing is, the function "validate_website_format" is nowhere to be found in the user datahandler... Maybe I'm just being stupid?
from mybb.
Also just checked crossreference at mybboard.de. No listing of the above function either. Odd.
from mybb.
It's in inc/functions.php: https://github.com/mybb/mybb/blob/feature/inc/functions.php#L5320
from mybb.
Ah, thanks Stefan. No idea why it didn't show up in sublime function search.
On Jan 28, 2013 1:38 PM, "Stefan T." [email protected] wrote:
It's in inc/functions.php:
https://github.com/mybb/mybb/blob/feature/inc/functions.php#L5320—
Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-12781874.
from mybb.
@Sama34 This happens when somebody changes code without creating a ticket for SQA: bae6745
Nobody knows about it and tests it...
from mybb.
@Sama34 Your regex in validate_website_format is incorrect. It forces www. and doesn't take into account subdomains or anything. This is a more complete one I think:
^(ht|f)tp(s)?:\/\/w{0,3}[a-zA-Z0-9_\-.:#/~}]+$
Tested it in regexr against URLs with subdomains, ftp://,ftps://,http://,https://
from mybb.
Alternatively, we could also use filter_var. It's PHP 5.2+ without the PECL extension though :( Wish we could bump the system requirements to PHP 5.2...
filter_var($website, FILTER_VALIDATE_URL);
from mybb.
We can bump it. I would suggest, at a minimum, 5.3.
Sent from my iPad
On 28 Jan 2013, at 14:11, "Euan T." [email protected] wrote:
Alternatively, we could also use filter_var. It's PHP 5.2+ without the PECL extension though :( Wish we could bump the system requirements to PHP 5.2...
filter_var($website, FILTER_VALIDATE_URL);
—
Reply to this email directly or view it on GitHub.
from mybb.
We should probably review the installation statistics to check if that's wise. I asked Tim for them a while ago but I assume he forgot.
from mybb.
@tommm I would LOVE if we could bump to 5.3, though I seem to remember seeing install statistics fairly recently(?) that said quite a few people are still restricted to 5.2 :( Could be wrong. Hopefully Tim can shed some insight as @nmalcolm said.
from mybb.
I think a majority of people are still on 5.2.17, it seems to be the most common... my shared host has it. I'll poke them about upgrading though :P
from mybb.
That's the unfortunate position I think many people are still in sadly. Some hosts suck at keeping up to date. 5.3 has been out for ages now and there's no excuse for not upgrading.
from mybb.
@tommm This code is also in 1.6, no chance to change the requirements. ;)
from mybb.
I think we could bump 1.8 to 5.2.
from mybb.
My host just informed me they're upgrading to PHP 5.4 in a few weeks. Let's hurry up and make MyBB 5.4 compatible :P
from mybb.
I still think that we'll probably have to set the minimum version to 5.2 unfortunately. Hopefully Tim can get us some install stats though so we can be 100% sure.
from mybb.
Most reputable hosts are capable of 'turning on' PHP 5.3.
from mybb.
Yes, but we get many users using less reputable hosts and even free hosts. We can't just bump system requirements without properly breaking down the number of installs on our target environments.
from mybb.
http://community.mybb.com/attachment.php?aid=20308
And these were from two years ago :p
Gives a clear idea that PHP 5.2 isn't an issue here ^_^.
In terms of 5.3, well that remains to be seen.
from mybb.
We should be fairly okay with 5.2 then. Question is, has 5.3 support stepped up?
from mybb.
You want to change the requirements because of this?
And we still need a solution for 1.6.
from mybb.
What exactly was the issue with the code in the first place?
If it seemed to work then why did we change it? :P
from mybb.
What's the original problem? What was this supposed to fix?
Sent from my iPad
from mybb.
Not entirely sure. Omar pushed to fix a bug not on the tracker.
from mybb.
http://community.mybb.com/thread-131562.html I think this is the (internal) Thread we discussed this.
from mybb.
I'm going to revert this in 1.6 if nobody commits a working solution.
from mybb.
Probably the best course of action. It works as is so why change it?
from mybb.
I could be wrong, but I asked cpanel, their upgrader, and installer installs 5.3 automatically, so unless hosts rebuild and choose 5.2.17, they are using 5.3. @PenguinPaul php 5.4 hasnt been shiped yes, although it should ship before june in time for a cpanel update
from mybb.
@trainhappy Not everybody uses cpanel...
from mybb.
Reverted in 1.6: 2b05b92
from mybb.
This was totally my mistake and I fell really sorry about it. I shouldn't have apply this featured this way or probably at all. No hard feeling, but the mistake is quite obvious.
Any other revert required just mention it so none wastes their time with this.
from mybb.
We'll be bumping up the minimum PHP version to 5.2 so we can use filter_var().
from mybb.
This is no longer an issue as the commit was reverted.
from mybb.
Related Issues (20)
- Default to current forum in "Move / Copy Thread" dropdown
- Improve 2FA QRCode presentation
- Fix PHP 8 compatibility issues since version 1.8.37 HOT 6
- Blank characters stripping improvement in usernames HOT 2
- Use `CURLOPT_DISALLOW_USERNAME_IN_URL` with curl
- Check `errorloglocation` for unexpected values
- Invalid AdminCP login warning 1.8.37 PHP 8.2
- build_theme_select does not render subtemplates in select if these are aloowed HOT 2
- Search Hooks useless on no result HOT 1
- Awaiting Moderation thread count issue HOT 2
- Moderation tools UX improvements HOT 1
- get_profile_link escapes & in profile URL due to htmlspecialchars, breaks URL
- MyBB 1.8.37 Error 500 "PHP Fatal error: Cannot redeclare error()" HOT 7
- Deprecated service used for 2FA image generation
- Bug when removing a member from a group that could become invisible HOT 2
- Missing "my_post_key" code in cancel subscription email notification HOT 2
- Restrict loading plugins files during `NO_PLUGINS`
- Graceful errors for failing plugins in ACP
- utf8_decode is deprecated since PHP 8.2
- Allow the use of html in emails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybb.