FIX: Add bookmark limits (PR #11725)

Adds a bookmark search per page limit, a total bookmark creation limit, and a rate limit per day for bookmark creation.

GitHub

One-liner FTW :wink:

    @params[:per_page] = PER_PAGE if @params[:per_page] > PER_PAGE

I don’t think you need to go as far as changing the constant value. I would just test that if you ask for 1000, you only get 20.

I think it’s the first time I see the after block at the end of a spec. We usually put it after the before block since it’s “technically” part of the setup of the spec (more like the cleanup)

@ZogStriP I have made the review changes now :slight_smile:

LGTM :+1:

2000 is much too low, I have almost 3000, and no intents to delete those…

Please make this configurable :pray:

@0x4a you’re in luck, there is now a site setting called max_bookmarks_per_user that configures this limit :slight_smile: