internetarchive / internetarchive/openlibrary

Trigger spam detector only when restricted phrases are added to a record

Open
#5,812 2 comments 2 reactions 0 assignees View on GitHub
Affects: Data Affects: Librarians Lead: @cdrini Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

Some words and phrases have been identified as spam and throw errors when added to a page. However, these words sometimes exist legitimately on a record. When someone tries to edit one of those records, i.e. change author or language, they will also see an error and be prevented from making any edit to the record.

### Evidence / Screenshot (if possible)

### Relevant url?
https://openlibrary.org/search?q=dvd&mode=ebooks&has_fulltext=true

### Steps to Reproduce

1. Go to ...https://openlibrary.org/books/OL24205752M/DVD_Review_presents_the_ultimate_DVD_guide/edit
2. Do ...try to save an edit

* Actual: Error: Oops
Something went wrong. Please try again later.
* Expected: Edit should be saved when not adding spam.

### Details

- **Logged in (Y/N)?** y
- **Browser type/version?** Chrome Version 95.0.4638.54 (Official Build) (x86_64)
- **Operating system?** Mac OS
- **Environment (prod/dev/local)?** prod

### Proposal & Constraints

### Related files

### Stakeholders

@cdrini @mekarpeles @jimchamp @dcapillae

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the problem at the linked book edit URL and trace the save path that invokes the spam detector. Done means edits such as changing the author or language succeed when no restricted phrase is added, while adding a restricted phrase still produces the spam error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.