Photography Domain Invalid as Website on Profile

Hi,

I help run a large photography community and several of our members are trying to use the .photography domain for their website list in their profile, but receive a message saying the website is invalid. The format that is being attempted looks like this.

http://www.example.photography

But this is the error message that is received.

I’ve looked for a setting or something that would allow this type of domain, but I couldn’t find anything. How could support be added for the .photography domain?

Thanks,
-Adam

@tgxworld is this a spot where your mini suffix gem is missing?

3 Likes

Hi @sam, thanks for the response. I am guessing by your reply @tgxworld is the person that knows the answer to my question, correct? Thanks for the help you all can provide.

If the risk is low and the code already exists to do this, we should get it in for 1.9.

1 Like

What do you have configured for user website domains whitelist in your site settings? That validation you ran into is only activate if user website domains whitelist is configured.

5 Likes

There is nothing in that field. See below:

Can you run the following commands for me just to confirm :slight_smile:

./launcher enter app
bundle exec rails console
> SiteSetting.user_website_domains_whitelist
1 Like

It’s empty.

Please note that this instance is on 1.8.10 stable (hosted with us)

@Splitterside if it turns out that the version has something to do with it, we can upgrade you to 1.9 latest beta if you want to.

2 Likes

Hmm this is abit of a mystery to me…

The only place that code is called

1 Like

I believe they need this commit:

So, the fix is live on the 1.9.x branch (as always).

3 Likes

Ah thank you!! I totally missed

1 Like

Thanks everyone for the clarity.

I get that it’s in beta, so there will always be bugs, but are there any major concerns about upgrading to 1.9? Is there an ETA for the release of 1.9?

It’s coming this year, so it’s very soon!

@tgxworld should we move this validation to your new gem ? Sounds like a good idea.

4 Likes

Yea should be pretty low risk so I’ll give it a crack tml.

3 Likes

Thanks @Falco for the quick answer.

@RGJ I am not sure that we want to update to the beta until it is released since it sounds like it is around the corner. Would it be possible to mark our account to be updated once it is released? Thanks.

We were going to do that anyway :slight_smile:

1 Like

OK so I had a look through the previous commits and realized that what we initially wanted to do is to validate the format of the URL. That means that there is no need for us to care about whether the URL would return a valid HTTP response as that would require a different solution if we wanted to verify that.

However, I did noticed that our UrlValidator wasn’t handling a bunch of cases properly and that has been fixed in

I’ve also switched the validation for UserProfile#website to use our UrlValidator which removes the Regexp that has been quite problematic for us



7 Likes

Do we also want to treat non-ascii URLs, like http://見.香港/, as valid?

3 Likes

I guess we should, it seems to work in the browser.

4 Likes