The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Вариант для распечатки  
Пред. тема | След. тема 
Форум Разговоры, обсуждение новостей
Режим отображения отдельной подветви беседы [ Отслеживать ]

Оглавление

Утечка исходных текстов браузера Opera 12.15, opennews (??), 14-Янв-17, (0) [смотреть все] +1

Сообщения [Сортировка по времени | RSS]


228. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 23-Янв-17, 16:37 
> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400

another minipatch, for content blocker UI: don't add «http://» for patterns like «||example.com/*», and replace simple «example.com» to «||example.com/*».

http://dpaste.com/21AF0F9

Ответить | Правка | К родителю #197 | Наверх | Cообщить модератору

230. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Zero3Kemail (?), 24-Янв-17, 00:51 
>> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400
> another minipatch, for content blocker UI: don't add «http://» for patterns like
> «||example.com/*», and replace simple «example.com»
> to «||example.com/*».
> http://dpaste.com/21AF0F9

How hard would it be to add Auto Complete to it?

Ответить | Правка | Наверх | Cообщить модератору

231. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Zero3Kemail (?), 24-Янв-17, 05:42 
>>> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400
>> another minipatch, for content blocker UI: don't add «http://» for patterns like
>> «||example.com/*», and replace simple «example.com»
>> to «||example.com/*».
>> http://dpaste.com/21AF0F9
> How hard would it be to add Auto Complete to it?

It would be nice if someone made a patch to make the "Open tabs inside current window" checkbox of the Manage Sessions dialog box stay checked.

Ответить | Правка | Наверх | Cообщить модератору

233. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 24-Янв-17, 06:04 
> It would be nice if someone made a patch to make the
> "Open tabs inside current window" checkbox of the Manage Sessions dialog
> box stay checked.

what do you mean?

Ответить | Правка | Наверх | Cообщить модератору

241. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Zero3Kemail (?), 24-Янв-17, 07:16 
I want the checkbox in the following picture to stay checked when clicked on (basically, make it a permanent option):

https://snag.gy/KAr0HO.jpg

Ответить | Правка | Наверх | Cообщить модератору

243. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 24-Янв-17, 07:24 
> I want the checkbox in the following picture to stay checked when
> clicked on (basically, make it a permanent option):
> https://snag.gy/KAr0HO.jpg

ah, i see. this will basically need a new preference (easy), and then we'll have to bind that checkbox to our new pref (easy). i'll try to look at it. but don't hold your breath, my memory is bad and my attention span is short.

also, this may be a good task for someone trying to «dive into opera». just look at my picture loading patch to find out how to work with prefs, and then look at quick's preferences dialog to find out how to make bindings to prefs. you may ping other presto developing communities out there.

Ответить | Правка | Наверх | Cообщить модератору

245. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Zero3Kemail (?), 24-Янв-17, 07:37 
>[оверквотинг удален]
>> https://snag.gy/KAr0HO.jpg
> ah, i see. this will basically need a new preference (easy), and
> then we'll have to bind that checkbox to our new pref
> (easy). i'll try to look at it. but don't hold your
> breath, my memory is bad and my attention span is short.
> also, this may be a good task for someone trying to «dive
> into opera». just look at my picture loading patch to find
> out how to work with prefs, and then look at quick's
> preferences dialog to find out how to make bindings to prefs.
> you may ping other presto developing communities out there.

And one more thing to make a mention of. It would be nice if it used the first tab shown when it has just been opened when opening a session instead of opening first tab of the session as a new tab.

Ответить | Правка | Наверх | Cообщить модератору

232. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 24-Янв-17, 06:02 
>>> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400
> How hard would it be to add Auto Complete to it?

sorry, i don't even know what to autocomplete there (and i hate autocompletion altogether ;-).

there is no list of «accessed urls» for loaded page (that list can be created only by external debugger for now), so we can't autocomplete even site names.

Ответить | Правка | К родителю #230 | Наверх | Cообщить модератору

234. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 24-Янв-17, 06:07 
>>>> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400
>> How hard would it be to add Auto Complete to it?

lol, quotes…

Ответить | Правка | Наверх | Cообщить модератору

242. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Zero3Kemail (?), 24-Янв-17, 07:23 
>>>> New Thread on 4chan: http://boards.4chan.org/g/thread/58567400
>> How hard would it be to add Auto Complete to it?
> sorry, i don't even know what to autocomplete there (and i hate
> autocompletion altogether ;-).
> there is no list of «accessed urls» for loaded page (that list
> can be created only by external debugger for now), so we
> can't autocomplete even site names.

I mean, autocomplete for text boxes

Ответить | Правка | К родителю #232 | Наверх | Cообщить модератору

244. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 24-Янв-17, 07:26 
> I mean, autocomplete for text boxes

there should be something to show in autocomplete selection. ;-) basically, each UI edit box will need an unique id then to store it's input history. and i see no personal value in this feature, so i definitely won't do it.

p.s.: otherwise, it's not hard. a matter of creating new quick widget «lineedit with autocompletion», based on existing lineedit widget and autocompletion part from urlbar. mostly «copy-paste-fix-obvious-crap» work.

Ответить | Правка | Наверх | Cообщить модератору

265. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от VladSh (?), 25-Янв-17, 21:39 
> «copy-paste-fix-obvious-crap» work

но от того не менее нужная :-) Желающих использовать пофиксеную версию валом, а людей со знаниями чтобы это сделать нуту :(


Ответить | Правка | Наверх | Cообщить модератору

270. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 26-Янв-17, 08:40 
>> «copy-paste-fix-obvious-crap» work
> но от того не менее нужная :-) Желающих использовать пофиксеную версию валом,
> а людей со знаниями чтобы это сделать нуту :(

плохо. потому что мои интересы специфичны, и я делаю только то, что надо лично мне. как только меня будет всё устраивать (очень скоро) — патчфест закончится.

Ответить | Правка | Наверх | Cообщить модератору

271. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 26-Янв-17, 08:46 
> но от того не менее нужная :-) Желающих использовать пофиксеную версию валом,
> а людей со знаниями чтобы это сделать нуту :(

зато есть целеполагатели. опять, видите ли, «не с того начали». передайте кто‐нибудь этому дауну, что его «12.18» — это та самая 12.15, с патчем на ECC. и что версии меряют по версии opera core.

хотя нет, не передавайте, у него винда пустого черепа.

Ответить | Правка | К родителю #265 | Наверх | Cообщить модератору

264. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от VladSh (?), 25-Янв-17, 21:38 
> another minipatch, for content blocker UI: don't add «http://» for patterns like
> «||example.com/*», and replace simple «example.com»
> to «||example.com/*».

Люди на ру-боарде интересуются:
1. Чем отличается данный патч от записи «*example.com/*», которая у народа используется в urlfilter повсеместно?
2. Как использовать этот вышеуказанный код?

Ответить | Правка | К родителю #228 | Наверх | Cообщить модератору

267. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от someguy (?), 26-Янв-17, 01:44 
>> another minipatch, for content blocker UI: don't add «http://» for patterns like
>> «||example.com/*», and replace simple «example.com»
>> to «||example.com/*».
> Люди на ру-боарде интересуются:
> 1. Чем отличается данный патч от записи «*example.com/*», которая у народа используется
> в urlfilter повсеместно?
> 2. Как использовать этот вышеуказанный код?

Наверное тем, что под шаблон *example.com/* попадает и trueexample.com и gaykeksexample.com, а || подменяет точно протокол.
Даже *//example.com/* не гарантирует

Ответить | Правка | Наверх | Cообщить модератору

268. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 26-Янв-17, 08:35 
> Наверное тем, что под шаблон *example.com/* попадает и trueexample.com и gaykeksexample.com,
> а || подменяет точно протокол.
> Даже *//example.com/* не гарантирует

верно. «*example.com/*» — это один долбоклюй придумал, а другие используют. под это попадёт даже: «https://localhost/dumb.php?example.com/a»

«||» обозначает: «протокол *и* любые поддомены, включая пустой». потому «example.com», «abc.example.com» — но не «sexample.com».

более‐менее рабочая замена «||example.com/*» возможна только двумя выражениями:
^*://example.com/*
^*://*.example.com/*
и то это некорректно, потому что во втором вторая звезда может отматчить что угодно.

а что с кодом делать… иметь его. если кому‐то не ясно, что делать с патчем — то это надо с начала времён пояснять. а кому ясно — тому не надо.

p.s.: «||xxx» вдобавок ещё и быстрее. совсем немного, но быстрее.

Ответить | Правка | Наверх | Cообщить модератору

298. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от VladSh (?), 28-Янв-17, 14:16 
> another minipatch, for content blocker UI...
> http://dpaste.com/21AF0F9

Его бы тоже на timsky перенести с описанием и примерами (очень хорошее оно здесь).
И всю историю по каракану; это же интересно! :)

Ответить | Правка | К родителю #228 | Наверх | Cообщить модератору

299. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 28-Янв-17, 14:33 
> Его бы тоже на timsky перенести с описанием и примерами (очень хорошее
> оно здесь).
> И всю историю по каракану; это же интересно! :)

ну так пусть перенесёт кто‐нибудь: я что, швец‐жнец‐на‐дуде‐капец? мне на своё авторство наплевать, если что.

Ответить | Правка | Наверх | Cообщить модератору

308. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от VladSh (?), 29-Янв-17, 15:13 
Не вопрос, перенесу)
По urlfilter перенёс. По каракану чуть позже, на это надо гораздо больше времени.
Ответить | Правка | Наверх | Cообщить модератору

300. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от a.non (?), 28-Янв-17, 16:58 
> another minipatch, for content blocker UI: don't add «http://» for patterns like
> «||example.com/*», and replace simple «example.com»
> to «||example.com/*».
> http://dpaste.com/21AF0F9

Better to make it "||example.com^*" to match "example.com:80" too.

Please note, that it will match "http://foo.com/example.com/" even though it is not supposed to.

Ответить | Правка | К родителю #228 | Наверх | Cообщить модератору

301. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 28-Янв-17, 17:12 
> Please note, that it will match "http://foo.com/example.com/" even though it is not
> supposed to.

yeah, you are right. tnx, this is something i will fix eventually. i didn't read the code deep enough. my bad.

Ответить | Правка | Наверх | Cообщить модератору

302. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Аноним (-), 28-Янв-17, 18:36 
"*^" is bugged too. "*/foo" and "http://example.com^foo" match "http://example.com/foo", but "*^foo" does not.
Ответить | Правка | Наверх | Cообщить модератору

303. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 28-Янв-17, 18:51 
> "*^" is bugged too. "*/foo" and "http://example.com^foo" match "http://example.com/foo",
> but "*^foo" does not.

yeah. they did matching optimization by searching for the first character from the pattern (after the «*»), and failed to consider that «^» has a special meaning there.

actually, the whole wildcard matching code is crappy (althru not a cosmic horror ;-), and should be rewritten.

Ответить | Правка | Наверх | Cообщить модератору

304. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Аноним (-), 29-Янв-17, 00:19 
|| and ^ were added late, so they might cause bugs anywhere.

I've checked the code, and it looks like the pipe can break the hashing code, because it's not in the IsCharacterWildCard(). For example, "||com/" does not match "http://example.com/".

The content_filter could be improved a lot in many interesting ways.

All the extensions with ad-block subscriptions take a very long time to load and update filters. I haven't tried to debug them, but I suspect that it is the API being very slow to load filters one-by-one and not the extensions themselves.

I also suspect that the matching algorithm can be improved, especially for the huge lists. /content_filter/tests/data/hugelist.ini has 4k lines... fanboy-ultimate.txt is over 90k (~50k without CSS rules). Currently they seem to check every filter's hash for the given URL in the FilterURLList::Find(). One beautiful optimization would be to store most rules starting with || in a hash table with the domain as a key (with 2-level domain minimum and, say, 4-level maximum). That should make matching over that set faster, especially since you often have to check multiple URLs with the same domain. More general rules could also use something of [ url_length * log(filter_list_length) ] complexity, although I'm not sure what's possible there and how would it compare to the current approach.

The API and format could be improved too. Caching hashes between browser restarts and differential list updates come to mind.

Ответить | Правка | Наверх | Cообщить модератору

305. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 29-Янв-17, 00:41 
yeah, you are absolutely right. the extension API for content blocker is freakin' slow, and the matching itself can be improved alot. it is also possible to build some «preselect» tables to quickly reject most filters, and painlessly process megabytes of data from urlfilter.ini. ;-) something like boyer-moore, but for filters. i believe that adblock+ and uBo both are doing something like that; and we have somewhat easier task at hand, 'cause we don't need to analyze full regexps.
Ответить | Правка | Наверх | Cообщить модератору

309. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Аноним (-), 29-Янв-17, 16:59 
> something like boyer-moore, but for filters.

Well, before implementing custom substring search algorithm for URLFilter::MatchUrlPattern(), I would try to convert the pattern to a RegExp. It should be faster than current naive checker and as fast as any other custom algorithm. RegExps could be compiled on demand and cached.

For the preselection something that utilizes common filtering patterns could be used. The "domain as a dictionary lookup key" should take care of about 3/4 rules.

Additionally, some lookup by path parts as keys could be devised. Google does something similar: https://developers.google.com/safe-browsing/v4/urls-hashing#... .

Both of these lookups could be enabled based on the number of qualifying patterns.

For the rest, the current FilterURLList::Find() can be used. I don't think it differs significantly from the "shortcuts comparison" described here: https://adblockplus.org/en/faq_internal#filters . But either algorithm could be further improved, for example, by sorting those hashes/shortcuts.

Ответить | Правка | Наверх | Cообщить модератору

310. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 29-Янв-17, 17:20 
i'd better avoid using regexps in content blocker: they aren't *that* good in early rejecting, but slower and more memory-demanding. i think it is better to calculate b-m-like «substring presence» tables for patterns, and b-m table for url before checking. b-m table for urls can be cached in the content blocking module, btw, but i don't think that it is really worth the efforts: «domain as key» will take care of most rejects, i believe.
Ответить | Правка | Наверх | Cообщить модератору

311. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от Аноним (-), 29-Янв-17, 17:53 
It's worth a shot. To be clear, I mean that the pattern should be converted into regexp inside the URLFilter::MatchUrlPattern(), after all the preselection steps. I have no idea how much overhead would regexp creation introduce. And its speed would depend hugely on the regexp engine. But don't forget that Boyer-Moore doesn't come for free either.
Ответить | Правка | Наверх | Cообщить модератору

312. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от arisu (ok), 29-Янв-17, 18:11 
> It's worth a shot.

yeah. it is never too late to revert all the changes anyway. ;-) i'm not trying to stop you from implementing that, just thinking out loudly.

> To be clear, I mean that the pattern
> should be converted into regexp inside the URLFilter::MatchUrlPattern(), after all the
> preselection steps. I have no idea how much overhead would regexp
> creation introduce.

quite a lot. any decent regexp engine compiles expression into internal bytecode of some kind (possibly building kickstart and quick reject tables too), so it is better to at least cache created regexps.

> And its speed would depend hugely on the regexp engine.

here i think we should use the one that is used by Opera Core itself (modules/regexp). it is even JITed, as far as i can see.

> But don't forget that Boyer-Moore doesn't come for free either.

yea, but it is fast enough for small strings. and we can switch to b-m codepath only if we have some «big enough» amount of matches to check (after all possible early rejections).

Ответить | Правка | Наверх | Cообщить модератору

307. "Утечка исходных текстов браузера Opera 12.15"  +/
Сообщение от VladSh (?), 29-Янв-17, 15:11 
This discussion is going on there: http://forum.timsky.ru/viewtopic.php?f=7&t=35&sid=709e173737...
Ответить | Правка | К родителю #304 | Наверх | Cообщить модератору

Архив | Удалить

Рекомендовать для помещения в FAQ | Индекс форумов | Темы | Пред. тема | След. тема




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру