summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #159 from DimStar77/dbusifydbusifyDominique Leuenberger2021-01-061-2/+2
|\ | | | | Make libproxy-private static, non-installed
| * Make libproxy-private static, non-installedDominique Leuenberger2021-01-061-2/+2
| |
* | Merge pull request #158 from DimStar77/dbusifyDominique Leuenberger2021-01-061-32/+29
|\ \ | |/ | | Fix indentation in proxy.cpp
| * Fix indentation in proxy.cppDominique Leuenberger2021-01-061-32/+29
| |
* | Merge pull request #156 from DimStar77/dbusifyDominique Leuenberger2021-01-051-1/+3
|\ \ | |/ | | Re-add symbol versions, commit 2fb80a0
| * Re-add symbol versions, commit 2fb80a0Dominique Leuenberger2021-01-051-1/+3
| |
* | Merge pull request #155 from DimStar77/dbusifyDominique Leuenberger2021-01-0560-406/+1357
|\ \ | |/ | | Dbusify
| * Merge branch 'master' of github.com:DimStar77/libproxy into dbusifyDominique Leuenberger2021-01-0560-406/+1357
| |\ |/ /
| * Merge pull request #151 from lwindolf/patch-1Dominique Leuenberger2020-12-301-1/+1
| |\ | | | | | | Typo
| | * TypoLars Windolf2020-12-301-1/+1
| |/
| * Version 0.4.170.4.17Dominique Leuenberger2020-12-292-1/+5
| |
| * Merge pull request #149 from bigon/remove-libcDominique Leuenberger2020-12-151-6/+0
| |\ | | | | | | python: Do not load the libc anymore
| | * python: Do not load the libc anymoreLaurent Bigonville2020-12-141-6/+0
| |/ | | | | | | | | This is not needed since the addition of px_proxy_factory_free_proxies() in d52cc34458b1d6a524df12db2671fa3a15892fcf
| * Merge pull request #147 from DimStar77/issue125Dominique Leuenberger2020-12-141-3/+3
| |\ | | | | | | python bindings: fix "TypeError: _argtypes_ must be a sequence of types"
| | * python bindings: fix "TypeError: _argtypes_ must be a sequence of types"Dominique Leuenberger2020-12-141-3/+3
| |/ | | | | | | Fixes #125
| * Merge pull request #146 from gdsotirov/issue-145Dominique Leuenberger2020-12-071-0/+1
| |\ | | | | | | Include cerrno
| | * Include cerrnoGeorgi D. Sotirov2020-12-061-0/+1
| |/ | | | | | | Include cerrno header for errno and EINTR.
| * Merge pull request #144 from DimStar77/pre-0.4.160.4.16Dominique Leuenberger2020-12-042-1/+5
| |\ | | | | | | Release: 0.4.16
| | * Release: 0.4.16Dominique Leuenberger2020-11-172-1/+5
| |/
| * 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 #114 from smcv/python-bytestringsDominique Leuenberger2020-11-101-3/+23
| |\ \ | | | | | | | | python: Convert URLs to/from UTF-8 under Python 3
| | * | python: Convert URLs to/from UTF-8 under Python 3Simon McVittie2020-04-281-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, strings are Unicode (UTF-16 or UTF-32 depending on build options), and are passed to ctypes function wrappers as such. Convert the input URL to a bytestring for processing by libproxy, and convert the results back into (Unicode) strings by decoding them. From the pacrunner_webkit module, it appears that libproxy expects strings to be in UTF-8 (like GLib/GTK), so use that encoding for bytestrings. Fixes: #65
| * | | 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-103-2/+3
| |\ \ \ \ | | | | | | | | | | | | Disable mozjs extension by default
| | * | | | Disable mozjs extension by defaultMichael Catanzaro2020-09-223-2/+3
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge pull request #142 from mcatanzaro/mcatanzaro/libmodmanDominique Leuenberger2020-11-101-18/+3
| |\ \ \ \ | | | | | | | | | | | | Never use system libmodman
| | * | | | Never use system libmodmanMichael Catanzaro2020-09-241-18/+3
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was very surprised to discover that libmodman is a system library. It's packaged separately from libproxy in distros (I checked Fedora and openSUSE), and libproxy's build system does not install its files, but libproxy nonetheless appears to be the only upstream. Distros build the system library from a decade-old tarball. Anyway, nothing besides libproxy uses it, so the system package should probably be retired. By using our own internal libmodman, we can make API and ABI changes to modernize libmodman and improve its safety, without having to worry about other consumers (which don't exist, anyway). Fixes #140
| * | | | Merge pull request #137 from mcatanzaro/mcatanzaro/mismatched-deleteDominique Leuenberger2020-11-101-4/+4
| |\ \ \ \ | | |/ / / | |/| | | Fix mismatched new[]/delete[] in proxy.cpp
| | * | | 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-103-7/+15
| |\ \ \ | | | | | | | | | | Enable building in Visual Studio 2019 without mingw.
| | * | | Added some ignores when using Visual Studio 2019's built in CMake support.Ross Porter2020-09-031-0/+5
| | | | |
| | * | | 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
| * | | | Merge pull request #133 from TechSmith/winProxyBypassDominique Leuenberger2020-09-101-1/+5
| |\ \ \ \ | | |/ / / | |/| | | Parse the windows bypass list
| | * | | 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 #130 from mcatanzaro/mcatanzaro/_BSD_SOURCEDominique Leuenberger2020-09-031-1/+0
| |\ \ \ | | |/ / | |/| | Stop defining _BSD_SOURCE
| | * | Stop defining _BSD_SOURCEMichael Catanzaro2020-08-121-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not needed here and has been deprecated for a long time. Fixes: [ 82%] Building CXX object libproxy/CMakeFiles/config_kde.dir/modules/config_kde.cpp.o In file included from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:27, from /home/mcatanzaro/Projects/libproxy/utils/proxy.c:21: /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~
| * | 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 #121 from rzvncj/masterDominique Leuenberger2020-06-021-0/+3
| |\ \ \ | | |_|/ | |/| | cmake: fix generate-time warning
| | * | cmake: fix generate-time warningRazvan Cojocaru2020-05-211-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the following warning: CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it.