summaryrefslogtreecommitdiff
path: root/libproxy
Commit message (Collapse)AuthorAgeFilesLines
* config_kde: Use kf5-config instead of qtpathsMalte S. Stretz2021-11-221-1/+1
| | | | | | | | qtpaths is a developer tool which is not guaranteed to exist on all KDE installations (notably KDE neon). If it doesn't exist, the cache isn't used at all. The equivalent to kde4-config is kf5-config, let's use that.
* pacrunner: Ensure hostname is null-terminatedZhaofeng Li2021-07-133-2/+7
|
* Improve detection of multiple pacrunnersZhaofeng Li2021-07-131-1/+4
| | | | | Now that we have 4 pacrunner modules, it's pretty ugly to enumerate all the possibilities.
* Add Duktape pacrunner moduleZhaofeng Li2021-07-133-0/+161
|
* Actually disable mozjs by defaultZhaofeng Li2021-06-132-2/+2
| | | | Fixes #153.
* config_envvar: Add environment variable for pacrunner debuggingZhaofeng Li2021-06-131-0/+6
|
* cmake/modules/config_sysconfig: Allow configuration of sysconfig moduleRichard Purdie2021-02-211-2/+5
| | | | | | | | | Checking whether the host system has /etc/sysconfig is not deterministic when cross compiling. Allow this to be disabled by adding a configure option for it. OpenEmbedded can set this and have deterministic build output independent of the host OS. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* TypoLars Windolf2020-12-301-1/+1
|
* Version 0.4.170.4.17Dominique Leuenberger2020-12-291-1/+1
|
* Include cerrnoGeorgi D. Sotirov2020-12-061-0/+1
| | | | Include cerrno header for errno and EINTR.
* Release: 0.4.16Dominique Leuenberger2020-11-171-1/+1
|
* Merge pull request #126 from lifeibiren/fix-overflow-with-large-pacDominique Leuenberger2020-11-101-13/+31
|\ | | | | Fix buffer overflow when PAC is enabled
| * Fix buffer overflow when PAC is enabledFei Li2020-07-171-13/+31
| | | | | | | | | | | | The bug was found on Windows 10 (MINGW64) when PAC is enabled. It turned out to be the large PAC file (more than 102400 bytes) returned by a local proxy program with no content-length present.
* | Merge pull request #128 from mcatanzaro/mcatanzaro/#68Dominique Leuenberger2020-11-103-14/+4
|\ \ | | | | | | Remove nonfunctional and crashy pacrunner caching
| * | Remove nonfunctional and crashy pacrunner cachingMichael Catanzaro2020-09-103-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libproxy currently attempts to cache pacrunner objects in the pr member variable of its pacrunner_extension object. This is broken, though, because it relies on the pacrunner object also being stored in pacrunner_extension's last member variable, which is never written to. So that caching has never worked properly. In practice, it only does one thing: it causes a threadsafety bug, #68, because it causes the old pacrunner object to be deleted on the thread that is creating the new pacrunner, which is illegal for both the mozjs and WebKit-based pacrunner extensions that expect their objects to be deleted on the same thread they were created on. This patch was originally written by Dan Winship for Fedora 19. It got dropped in Fedora 24, then resurrected again for Fedora 28 after we noticed 30,000 crash reports. I've tweaked it a bit to completely remove the unused member variables. Finally, note that this code is not exception-safe: if an exception is thrown, the pacrunner could be leaked. But this seems to be a common problem throughout libproxy. It should be fixed by using std::unique_ptr instead of raw new and delete. https://bugzilla.redhat.com/show_bug.cgi?id=998232 Fixes #68
* | | Merge pull request #139 from mcatanzaro/mcatanzaro/disable-mozjsDominique Leuenberger2020-11-101-1/+1
|\ \ \ | | | | | | | | Disable mozjs extension by default
| * | | Disable mozjs extension by defaultMichael Catanzaro2020-09-221-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mozjs doesn't have a stable API, so distros wind up carrying a bunch of patches to make it work with newer mozjs. Crashes ensue if it gets linked into gjs applications and the versions don't match. There's really no benefit to using this over the WebKit extension, so let's nudge distros towards using that instead. Distros: don't wait for this commit, go ahead and build with -DWITH_MOZJS=OFF today to use the WebKit backend instead.
* | | Fix mismatched new[]/delete[] in proxy.cppMichael Catanzaro2020-09-101-4/+4
|/ / | | | | | | | | | | | | Using the wrong delete operator is undefined behavior. All this manual new/delete really ought to be replaced by std::unique_ptr, but this will suffice for now.
* | Merge pull request #131 from TechSmith/vs2019buildableDominique Leuenberger2020-09-102-7/+10
|\ \ | | | | | | Enable building in Visual Studio 2019 without mingw.
| * | Trivial CleanupRoss Porter2020-09-031-6/+3
| | | | | | | | | | | | While working on c37a4f92, I noticed that there were multiple `#ifdef WIN32` statements that seemed to include duplicated defines. Did the cleanup work to combine these into a single `#ifdef`
| * | Use windows pipe open and close on win32Ross Porter2020-09-031-1/+7
| |/ | | | | | | | | | | Following the pattern found here: https://github.com/libproxy/libproxy/blob/d6990f4aaab4b947a490ab1abfd9ac6e62d66d7a/libproxy/url.cpp#L23, This commit uses the _popen and _pclose functions from windows `stdio.h` (included in the existing code via `<cstdio>` on windows builds). - https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/popen-wpopen?view=vs-2019 - https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/pclose?view=vs-2019
* | Merge pull request #129 from mcatanzaro/mcatanzaro/#127Dominique Leuenberger2020-09-1016-27/+27
|\ \ | | | | | | Remove dynamic exception specifications
| * | Remove dynamic exception specificationsMichael Catanzaro2020-08-1216-27/+27
| |/ | | | | | | | | | | | | | | | | C++98 called and it wants its dynamic exception specifications back! We'd better comply. https://en.cppreference.com/w/cpp/language/except_spec Fixes #127
* | Merge pull request #136 from mcatanzaro/mcatanzaro/#134Dominique Leuenberger2020-09-101-10/+18
|\ \ | | | | | | Rewrite url::recvline to be nonrecursive
| * | Rewrite url::recvline to be nonrecursiveMichael Catanzaro2020-09-091-10/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | This function processes network input. It's semi-trusted, because the PAC ought to be trusted. But we still shouldn't allow it to control how far we recurse. A malicious PAC can cause us to overflow the stack by sending a sufficiently-long line without any '\n' character. Also, this function failed to properly handle EINTR, so let's fix that too, for good measure. Fixes #134
* | Parse the windows bypass listRoss Porter2020-09-031-1/+5
|/ | | | | Converts the windows registry bypass list from semi-colon delimited to comma delimited Returns the full list of bypass urls
* Merge pull request #118 from smcv/mozjs-freed-stringDominique Leuenberger2020-06-021-7/+4
|\ | | | | mozjs: Avoid use-after-free
| * mozjs: Avoid use-after-freeSimon McVittie2020-05-011-7/+4
| | | | | | | | | | | | | | | | | | If we don't assign the temporary std::string returned by url_.to_string() to a variable, then it immediately goes out of scope and is freed, resulting in the result of c_str() pointing into freed memory. This works about as well as you would expect. Signed-off-by: Simon McVittie <smcv@debian.org>
* | Merge pull request #117 from smcv/gsettings-wait-for-initialDominique Leuenberger2020-06-022-5/+14
|\ \ | |/ |/| Fix race conditions in GSettings backend
| * gsettings: Wait for all configuration updatesSimon McVittie2020-05-011-1/+1
| | | | | | | | | | | | | | | | If we haven't polled the pxgsettings helper for a while, there might be more proxy configuration updates in the pipe than will fit in a single read() call. Signed-off-by: Simon McVittie <smcv@debian.org>
| * gsettings: Always read at least the initial values of all keysSimon McVittie2020-05-012-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the gsettings (gnome3) module would wait until it had read at least one key/value pair for each GSettings schema requested on the command line. However, GSettings schemas often contain more than one key. With a relatively elaborate proxy configuration, we don't necessarily read all of them in one read() from the pipe, resulting in the full configuration not being read until later - but for proxy(1), "later" is too late, because it exits after the first query. To resolve this, add a way for pxgsettings to signal that it has written all the initial values (a blank line), and wait for that. Fixes: #116 Signed-off-by: Simon McVittie <smcv@debian.org>
* | Merge pull request #105 from mwilck/pacrunnerDominique Leuenberger2020-04-293-0/+177
|\ \ | | | | | | New attempt to merge pacrunner support
| * | config_pacrunner: update response parsingMartin Wilck2020-02-141-3/+7
| | | | | | | | | | | | | | | Use the same algorithm as pacrunner's own "shim" libproxy, and add support for socks4 and socks5.
| * | config_pacrunner: add test for pacrunner availability on D-BusMartin Wilck2020-02-141-1/+47
| | | | | | | | | | | | | | | If the "org.pacrunner" D-Bus name is owned, it's likely that pacrunner is running. Use this as test for the module.
| * | Add config module for querying PacRunnerDavid Woodhouse2020-02-143-0/+127
| | |
* | | Merge pull request #112 from Vogtinator/fixverscriptDominique Leuenberger2020-04-291-2/+0
|\ \ \ | |_|/ |/| | RFC: Keep visibility of non-px_* symbols
| * | Keep visibility of non-px_* symbolsFabian Vogt2020-03-231-2/+0
| |/ | | | | | | | | | | | | | | | | | | | | Symbols other than px_* are still used by modules, so they have to be visible as well. Unfortunately the version script can't deal with C++ classes properly, it's not possible to match the vtable, typeinfo, etc. without resorting to the platform specific mangling. As a workaround, keep the default visibility of symbols which aren't explicitly mentioned, this means that while users of private API wouldn't be caught anymore, everything continues to work as usual, just with px_* being versioned.
* | pxgsettings: use the correct syntax to connect to the changed signalCorentin Noël2020-04-261-1/+1
| | | | | | | | | | As it is a detailed signal, it only makes sense to append a :: when there is a specific property to target. It used to be accepted but triggers a runtime warning with latest GLib.
* | Merge pull request #101 from albert-astals-cid-kdab/small_perf_improvDominique Leuenberger2020-04-1610-17/+17
|\ \ | | | | | | Small performance improvements
| * | Small performance improvementsAlbert Astals Cid2019-10-0410-17/+17
| |/ | | | | | | | | * pass strings by const & instead of copy * Search single chars as chars and not as strings
* | Merge pull request #109 from iainlane/mozjs-68Dominique Leuenberger2020-04-162-21/+41
|\ \ | | | | | | mozjs: Port to mozjs 68
| * | mozjs: Port to mozjs 68Iain Lane2020-03-112-21/+41
| |/ | | | | | | | | | | | | | | | | | | | | There are a number of API changes that need to be adapted to, notably - JS_EncodeString is gone; need to use JS_EncodeStringToUTF8 now which requires a rooted object to be passed in. - JS_free is gone The pkg-config file ships some flags which need to be supplied to the build.
* | Merge pull request #102 from illera88/patch-1Dominique Leuenberger2020-03-271-1/+1
|\ \ | | | | | | unistd.h is not present in Windows and makes build fail
| * | unistd.h is not present in Windows and makes build failAlberto Garcia Illera2019-11-131-1/+1
| |/
* | config_kde: Initialize config_loc.mtime explicitlyFabian Vogt2020-03-231-2/+4
|/ | | | Fixes #110
* Merge pull request #93 from alanc/masterDominique Leuenberger2019-07-161-0/+1
|\ | | | | include <string.h> in modules/config_gnome3.cpp
| * include <string.h> in modules/config_gnome3.cppAlan Coopersmith2018-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Needed to fix build on Solaris 11: libproxy/modules/config_gnome3.cpp:190:3: error: ‘memset’ was not declared in this scope FD_ZERO(&rfds); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* | Merge pull request #95 from bigon/mozjs-60Dominique Leuenberger2019-07-161-1/+1
|\ \ | | | | | | Build with mozjs 60 instead
| * | Build with mozjs 60 insteadLaurent Bigonville2018-12-091-1/+1
| |/ | | | | | | This seems enough to make it work with mozjs 60
* | Fixing memory leak in functions 'dnsResolve' and 'webkit_pacrunner::run'. ↵Dhaval Ved2019-02-141-2/+11
| | | | | | | | Delete memory allocated in jstr2str before return statements.