Open Bug 1596076 Opened 4 years ago Updated 1 year ago

Netmonitor Blocking - space can be edited into a blocking pattern at the end of a link

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox71 affected, firefox72 affected)

Tracking Status
firefox71 --- affected
firefox72 --- affected

People

(Reporter: cfogel, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Affected versions

  • 71.0b9, 72.0a1 (2019-11-12)

Affected platforms

  • Windows 10, macOS 10.15, Ubuntu 18.04;

Steps to reproduce
devtools.netmonitor.features.requestBlocking - pref set on true

  1. Launch Firefox, access any webpage ex: https://www.mozilla.org/en-US/
  2. Open DevTools, Netmonitor, Blocking Tab;
  3. Input the webpage address as a blocking pattern, press Enter key;
  4. Click to edit the blocking pattern;
  5. Press the Space key once;
  6. Press the Enter key;
  7. Click to edit the blocking again;
  8. Type in anything you want;
  9. Press the Enter key;

Expected result

  • string added at step 8 is added as a new blocking pattern;

Actual result

  • the same pattern remains, with space inside and the extra string added at step 8;

Regression range

  • not a regression, only visible after implementation of bug 1580728;

Additional notes

  • attached screenshot with the issue;
  • issue can be used to create duplicates(normal link and link with space at end) or prevent addition of desired patterns;
  • adding them by Copy-Paste is not affected (strings after links are added as different blocking patterns after the spacing).

Thanks for the report!

I have troubles to reproduce it on Windows 10, is it Mac OS specific?

Honza

Flags: needinfo?(cristian.fogel)

No, it doesn't appear to be limited to a speciffic OS.
Attached a recording with the STR as well.

As per the recording, really important is step 5 (adding the extra space in the pattern after adding it).
Another note is that, after these steps, you can add spacing inside the pattern and it won't split into multiple ones.

Flags: needinfo?(cristian.fogel)

(In reply to Cristian Fogel, QA [:cfogel] from comment #2)

Another note is that, after these steps, you can add spacing inside the pattern and it won't split into multiple ones.

I see, two comments:

  1. A new pattern should automatically split into more if there are spaces - this is a feature (allows to append multiple patterns at once)

  2. Not sure if adding spaces into an existing pattern is a problem. Chrome allows that too. But, Harald WDYT?

Honza

Flags: needinfo?(hkirschner)

Not sure if adding spaces into an existing pattern is a problem. Chrome allows that too. But, Harald WDYT?

Agreed, it would be an escape hatch for users who somehow think a space is needed in their pattern. I don't see why should strip it, but maybe we could escape it?

Flags: needinfo?(hkirschner)

Cristian, I don't see any wrong behavior in this report and it works as described in comment #3.
Can we close it?

Honza

Flags: needinfo?(cristian.fogel)

Played a bit more with Chrome in this area and the flow seems to make sense in the end for the space inside patterns part.
The main concern was that, since having spaces between links, they would be invalid. However the tool's purpose is to block, not to validate
requests.
So, in regards to that; the addition of spaces inside patterns is something that shouldn't be viewed as an issue.

The only aspect left here, is that editing and adding space_characters at the end of the link and then clicking away; would render the pattern useless after the page refresh.
There is no indicator of the edit; and might cause some invalid reports of the feature not working well in the future.
If the user would desire for the pattern to not be used; the normal flow would be to un-check the checkbox, not add an additional space so that it's no longer used.

Escaping the character(s) as per Harald's suggestion, (if I get it right) would be of great benefit in this area.
A side note would be the fact that this should be the case for the space(s) at both the beginning and the end of the pattern if any not just at the end.

So in my opinion; I wouldn't close it, but treat this as an enhancement.

Flags: needinfo?(cristian.fogel)
Type: defect → enhancement
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.