Exempt Links to other Topics/Posts from Link Limit?


(cpradio) #1

Continuing the discussion from Tmp/cache needs to be manually cleared when developing plugins:

I think this has a lot of merit (especially the part I bolded). Thoughts from everyone else?


(Mittineague) #2

This makes sense to me. If not completely exempt, a higher limit.
The only way I can see this possibly getting abused is if someone wanted to link to multiple SPAM posts in the site.
Edge case and not likely to go unnoticed for long.


(Jeff Atwood) #3

Already exists, edit the whitelist in the admin settings.


(cpradio) #4

Are you talking about this setting?


(cpradio) #5

Nope. Doesn’t work. I found two whitelist locations, the one above and one in onebox and neither permit a new user to post more than 2 links based on the domain of the site.

Can you elaborate your proposed solution?


(Atul Varma) #6

If this feature does exist, it’d be nice if this meta discourse forum whitelisted itself, so that my intra-site links (to reference other posts) didn’t count against my limit in my original post. Whitelisting URLs that point to the Github project for Discourse would also be ultra cool.


(Jeff Atwood) #7

Sorry about that, what I meant was, you won’t get blocked for posting tons of links to sites on the whitelist. However, maybe we should allow an unlimited number of links to any sites in the whitelist even from new users – @techAPJ can you look into that?

Also can you verify @techapj that internal links from new users, e.g. a brand new user who just created a new account, can create as many internal links to the local Discourse as they want?


(Arpit Jalan) #8

Okay, I just tested this thoroughly. Here are the conclusions:

This is already implemented. If you add a domain in white_listed_spam_host_domains setting, it will allow new users to post unlimited number of links to that domain.

@cpradio I found in my testing that including http:// or trailing / in domain breaks this functionality. Maybe you included them in domain you added? I sent a PR to make this clear:

https://github.com/discourse/discourse/pull/2576


This is already implemented. New users can post unlimited local Discourse links.


Also while testing this, I caught a bug:

https://meta.discourse.org/t/oneboxing-oneboxed-post-renders-distorted-ui/17953?u=techapj&source_topic_id=17112

(cpradio) #9

I used localhost:4000 initially, I also used 127.0.0.1 and localhost. None of them had worked in the environment I was using, but I’d have to set it up again to try it out. So I’m not sure what I did wrong, it may be how I had my environment setup to test it.


(Jeff Atwood) #10

This URL restriction of not allowing trailing slash or leading http does
not make sense to me, I would call that a bug, not a copy change @techapj


(Arpit Jalan) #11

Fixed:

https://github.com/discourse/discourse/pull/2580


(Jeff Atwood) #12