Exempt Links to other Topics/Posts from Link Limit?

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?

2 Likes

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.

1 Like

Already exists, edit the whitelist in the admin settings.

1 Like

Are you talking about this setting?

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?

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.

1 Like

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?

3 Likes

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:


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

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.

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

1 Like

Fixed:

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

1 Like