#58 Add request protector app with cross-domain cookies filtering

Birleştirildi
jonathan 4 yıl önce kris/request_protector_app içindeki 35 işleme master ile birleştirdi
kris 4 yıl önce yorum yaptı

@jonathan please review

Waiting on Jenkins build: https://jenkins.bubblev.org/job/bubble-dev-kris/252/
but not sure how it will go as current master build is failing.

@jonathan please review Waiting on Jenkins build: https://jenkins.bubblev.org/job/bubble-dev-kris/252/ but not sure how it will go as current master build is failing.
jonathan 4 yıl önce kris tarafından atandı
jonathan 4 yıl önce yorum yaptı
Sahibi

Looks good, but what would the regex be if the intent is “delete any cookies NOT belonging to the current domain, or one of its subdomains”?

It seems like we would need some more logic -- if we add these 2 things I think it would work:

  1. The regex can include {{fqdn}} which will be replaced (in mitm-land) with the (regex-escaped) FQDN for the current request
  2. In addition to regex and replacement, add mode which can be match or no_match. Or, alternatively, see if the “regex negation” syntax works in Python’s regex implementation, see: https://stackoverflow.com/questions/2637675/how-to-negate-the-whole-regex ). If regex negation works, that may be easier.

Thoughts?

Looks good, but what would the regex be if the intent is "delete any cookies NOT belonging to the current domain, or one of its subdomains"? It seems like we would need some more logic -- if we add these 2 things I think it would work: 1. The regex can include `{{fqdn}}` which will be replaced (in mitm-land) with the (regex-escaped) FQDN for the current request 2. In addition to `regex` and `replacement`, add `mode` which can be `match` or `no_match`. Or, alternatively, see if the "regex negation" syntax works in Python's regex implementation, see: https://stackoverflow.com/questions/2637675/how-to-negate-the-whole-regex ). If regex negation works, that may be easier. Thoughts?
kris 4 yıl önce yorum yaptı
Poster
  1. will do. Separate PR? (easier review)
  2. (?!...) is supported in python3’s re
1. will do. Separate PR? (easier review) 2. `(?!...)` is supported in python3's `re`
jonathan 4 yıl önce yorum yaptı
Sahibi
  1. will do. Separate PR? (easier review)

No, let’s do it in this one. And test it :) this will be very cool when it works!

  1. (?!...) is supported in python3’s re

That’s good news. Let’s do that.

> 1. will do. Separate PR? (easier review) No, let's do it in this one. And test it :) this will be very cool when it works! > 2. `(?!...)` is supported in python3's `re` That's good news. Let's do that.
kris başlık Add request protector app with cross-domain cookies filtering iken WIP: (testing after fqdn part) Add request protector app with cross-domain cookies filtering olarak değiştirildi 4 yıl önce
kris başlık WIP: (testing after fqdn part) Add request protector app with cross-domain cookies filtering iken Add request protector app with cross-domain cookies filtering olarak değiştirildi 4 yıl önce
kris başlık Add request protector app with cross-domain cookies filtering iken WIP: (waiting on fresh Jenkins build) Add request protector app with cross-domain cookies filtering olarak değiştirildi 4 yıl önce
kris başlık WIP: (waiting on fresh Jenkins build) Add request protector app with cross-domain cookies filtering iken Add request protector app with cross-domain cookies filtering olarak değiştirildi 4 yıl önce
kris 4 yıl önce yorum yaptı
Poster
Passing Jenkins build: https://jenkins.bubblev.org/job/bubble-dev-kris/260/
jonathan 4 yıl önce değişiklik istedi
jonathan bir yorum bırak

minor changes requested.

@@ -38,2 +38,3 @@
{"app": "UserBlocker"},
{"app": "TlsPassthru"}
{"app": "TlsPassthru"},
{"app": "RequestProtector"}
jonathan 4 yıl önce yorum yaptı

Let’s add RequestProtector app to all plans.

Let's add `RequestProtector` app to all plans.
@@ -452,0 +487,4 @@

def _replace_in_headers(headers: nheaders.Headers, modifiers_dict: dict) -> int:
"""
Taken from original mitmproxy's Header class implementation with sligh change to allow replacement with empty string
jonathan 4 yıl önce yorum yaptı

r/sligh/slight/

`r/sligh/slight/`
kris 4 yıl önce yorum yaptı

Actully, I’ll remove this second part completely as I did a larger changes here recently

Actully, I'll remove this second part completely as I did a larger changes here recently
jonathan 4 yıl önce işlemesinde bu konuyu işaret etti
Add request protector app with cross-domain cookies filtering (#58) Add RequestProtector app to cheapest plan Update comment with typo Merge branch 'master' into kris/request_protector_app Merge branch 'master' into kris/request_protector_app Merge branch 'kris/request_protector_app' of git.bubblev.org:bubblev/bubble into kris/request_protector_app Extract method for updating requests host and port Fix header replacement Replace all cross-domain cookies with empty Add fqdn variable support in header replacements Merge branch 'master' into kris/request_protector_app Merge branch 'master' into kris/request_protector_app Merge branch 'master' into kris/request_protector_app Merge branch 'master' into kris/request_protector_app Add add header replacement button label Try to add initial header replacement for cross-domain cookies Merge branch 'master' into kris/request_protector_app Merge branch 'master' into kris/request_protector_app use special header replacement to skip emptied headers Set RequestProtector replacement optional again Fix replacement reference in RequestProtector app Update flex domains with empty set if needed Add back request heades modifiers as prime app Extract and refactor _primeApp method Merge branch 'master' into kris/request_protector_app # Conflicts - WIP: # bubble-server/src/main/java/bubble/service/stream/StandardAppPrimerService.java Use HeaderReplacement's id field in JSONs Make RequestProtector's replacement field required Add new app to some plans Set new app to have `app` presentation Add RuleDriver and AppMatcher for the new app Add request protector app Remove not used filter Merge branch 'master' into kris/request_protector_app Add full support for response header modification Merge branch 'master' into kris/request_protector_app # Conflicts: # utils/cobbzilla-utils Add RequestProtector app Co-authored-by: jonathan <jonathan@noreply.git.bubblev.org> Co-authored-by: Kristijan Mitrovic <kmitrovic@itekako.com> Reviewed-on: https://git.bubblev.org/bubblev/bubble/pulls/58
jonathan 4 yıl önce değişiklik isteğini kapattı
jonathan kris/request_protector_app dalı silindi 4 yıl önce

Gözden Geçirenler

jonathan 4 yıl önce değişiklik istedi
Değişiklik isteği 237e90d126 olarak birleştirildi.
Bu konuşmaya katılmak için oturum aç.
Değerlendirici yok
Etiket Yok
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi

Bitiş tarihi atanmadı.

Bağımlılıklar

Bu çekme isteği henüz bir bağımlılık içermiyor.

Yükleniyor…
Henüz bir içerik yok.