Photography Domain Invalid as Website on Profile


(Adam Frick) #1

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


(Sam Saffron) #2

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


(Adam Frick) #3

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.


(Jeff Atwood) #5

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


(Alan Tan) #6

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.


(Adam Frick) #7

There is nothing in that field. See below:


(Alan Tan) #8

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

(Richard - DiscourseHosting.com) #9

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.


(Alan Tan) #10

Hmm this is abit of a mystery to me…

The only place that code is called


(Rafael dos Santos Silva) #11

I believe they need this commit:

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


(Alan Tan) #12

Ah thank you!! I totally missed


(Adam Frick) #13

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?


(Rafael dos Santos Silva) #14

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.


(Alan Tan) #15

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


(Adam Frick) #16

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.


(Richard - DiscourseHosting.com) #17

We were going to do that anyway :slight_smile:


(Alan Tan) #18

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




User website preference is invalid with underscore
(Alan Tan) #19

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


(Sam Saffron) #20

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