Opened on 01/28/2019 at 07:27:20 AM
Last modified on 01/28/2019 at 11:32:21 AM
#7241 new defect
Missing syntax validation and error message in input "Add domain"
Reported by: | jchee | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Libadblockplus-Android | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Environment
Orca 0.3.0
Android 8.0.0
How to reproduce
- Go to "Settings" on Orca
- Then navigate to "Ad blocking" > "Whitelisted domain"
- In the "Add domain" input, try entering ||example.com
- The input is accepted
Also, try to reproduce this:
(starting from step 3)
- Attempt to add @@||example.com and proceed to tap on the (+) icon
- (+) icon does not work, and input is not accepted
...
Observed behaviour
||example.com is accepted as an input while @@||example.com is not, but no error message shows up.
[Screenshot link](https://gitlab.com/eyeo/adblockplus/orca-android/uploads/ce80902c26f40ab86a29ac089a5f8a5b/photo6222203286350571588.jpg)
Expected behaviour
The input text should only accept valid domains and show error messages or disable the add/ok button when the input is wrong
Attachments (0)
Note: See
TracTickets for help on using
tickets.
I also wanted to add to the expected behavior that the input field should only accept domains once, as it's currently possible whitelist the same domain multiple times by entering it in the "Add domain" input again.
Steps to reproduce
Expected result
An error message is displayed as the domain is already in the list below.
Actual result
A duplicate entry of the domain is added to the list.
In Orca specifically, this causes an issue when trying to un-whitelist a site through the ABP popup menu in the toolbar: tapping the "Block annoying ads" switch to turn it back on reloads the page, but the switch stays off, and ads are not blocked. You need to repeat the process as many times as there are entries of that domain name in the whitelisted domains list, as it only deletes one at a time.