1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

178 Commits

Author SHA1 Message Date
Witold Filipczyk
361b8f661d [long] long -> intptr_t . Refs #8304
AFAIK on Windows long is sizeof 4, while void * is sizeof 8.
intptr_t is the same sizeof as void *.
2022-08-17 20:48:58 +02:00
Witold Filipczyk
7ea04c7f0f [isspace] Some implementations of isspace require unsigned char 2022-06-28 20:25:06 +02:00
Witold Filipczyk
409334369b [http] Changed default Accept-Header . Refs #143 2022-06-07 10:35:57 +02:00
Witold Filipczyk
a78f3a0891 [http] Fix issue with uploading files on DOS 2022-05-22 13:39:27 +02:00
Witold Filipczyk
0df4ef0571 [http] protocol.http.accept option . Refs #143 2022-04-20 11:24:23 +02:00
Witold Filipczyk
2c2cf97e03 [options] No need for C_ macro in INIT_OPT_* 2022-03-02 19:02:47 +01:00
Witold Filipczyk
d8b13d695a [http] const header_field 2022-02-21 17:58:36 +01:00
Witold Filipczyk
194a34a4be [http] const code 2022-02-21 17:55:31 +01:00
Witold Filipczyk
89340c3848 [intl] const char * in get_cp_mime_name 2022-02-18 15:45:47 +01:00
Witold Filipczyk
7fc4be7689 [http] changed declaration of done_http 2022-02-17 21:32:37 +01:00
Witold Filipczyk
10d2fb6c2b [quickjs] navigator fixes 2022-01-30 13:41:16 +01:00
Witold Filipczyk
ef044a5a62 [http] enum blacklist_flags -> blacklist_flags_T 2022-01-28 17:12:27 +01:00
Witold Filipczyk
cea2521b91 [encoding] enum stream_encoding -> stream_encoding_T 2022-01-28 16:17:25 +01:00
Witold Filipczyk
28a263eac7 [uri] enum uri_component -> uri_component_T 2022-01-28 15:56:59 +01:00
Witold Filipczyk
b0565cce64 [http] cast 2022-01-26 17:35:46 +01:00
Witold Filipczyk
2fa67c5730 [char] Introduced macro C_
C_("aaaa") -> (char *)("aaaa")
2022-01-19 22:49:13 +01:00
Witold Filipczyk
de2a787900 [strstr] no cast 2022-01-18 20:55:08 +01:00
Witold Filipczyk
53a860a3d6 [strchr] casting first parameter to const char * was not a good idea 2022-01-18 20:30:48 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
be8a030fa7 [mem_realloc] cast return value 2022-01-16 19:38:30 +01:00
Witold Filipczyk
20c161559c [mem_alloc] cast return value 2022-01-16 19:09:27 +01:00
Witold Filipczyk
b434b11309 [options] 0 (option_flags) -> OPT_ZERO 2022-01-15 20:10:37 +01:00
Witold Filipczyk
a4c8d2a2b9 [http] int -> enum uri_component 2022-01-15 19:16:16 +01:00
Witold Filipczyk
efad299950 [encoding] Removed deflate 2021-12-23 15:56:34 +01:00
Witold Filipczyk
0ed9511286 [c] compilation fixes on Pi 2021-12-22 16:12:09 +01:00
Witold Filipczyk
66305fcb50 [gettext] try system gettext. Refs #62
Now, only meson was changed.
-Dnls=true -Dgettext=true
2021-08-08 21:25:08 +02:00
Witold Filipczyk
cba5771c0c [limits.h] limits.h can be included uncoditionally 2021-03-19 14:30:54 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
5f87bdbcb2 [meson] meson build scripts.
Not finished yet, but I added to motivate myself and others.
The goal is to get a few seconds faster builds.

autotools still will be available.
2020-09-05 22:06:01 +02:00
Witold Filipczyk
e4220c0301 [encoding] Do not announce "deflate" as supported encoding method 2019-12-22 11:30:12 +01:00
Witold Filipczyk
90086599da [encoding] Experimental zstd encoding 2019-07-14 18:54:39 +02:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Witold Filipczyk
442f4936dc Use blacklist to skip verification of certificates 2017-07-23 18:59:05 +02:00
Witold Filipczyk
96e65c105f Explicit cast in strstr for C++ 2016-04-20 20:46:33 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
aec900f2ae Flush decompression with len = 0
This is required by code in encoding/brotli.c.
2016-01-16 13:03:54 +01:00
Witold Filipczyk
6eba447e8a Experimental brotli encoding support.
https://github.com/bagder/libbrotli
2015-10-12 23:18:23 +02:00
Witold Filipczyk
b4adf0d70d Prefer gzip. 2015-08-22 11:22:58 +02:00
Witold Filipczyk
7453b03279 deflate switched on again.
askubuntu.com uses deflate compression.
2014-09-01 12:50:23 +02:00
Witold Filipczyk
e7ebfa06c3 deflate is broken. 2014-09-01 12:19:49 +02:00
witekfl
4fc6343407 mem_free_if(data) instead of if (data) mem_free(data). Shorter. 2013-01-04 17:54:57 +01:00
witekfl
b0ea7cd7c1 decompress_data is now cleaner, isn't it? 2013-01-04 16:23:09 +01:00
witekfl
6fae43511c Call decompress_data only for compressed data.
Hope this is less missleading than before.
2013-01-04 16:00:50 +01:00
Kalle Olavi Niemitalo
ed6a33d318 http_negotiate: Fix int* vs. size_t* type mismatch
http_negotiate_parse_data passed &token->length as the int *outlen
parameter of base64_decode_bin, which stores an int at that location.
However, gss_buffer_desc::length is size_t in all implementations that
I checked: MIT Kerberos Version 5 Release 1.10, libgssglue 0.4, and
GNU GSS 1.0.2.  This mismatch could cause the build to fail:

.../src/protocol/http/http_negotiate.c: In function ‘http_negotiate_parse_data’:
.../src/protocol/http/http_negotiate.c:173:2: error: passing argument 3 of ‘base64_decode_bin’ from incompatible pointer type [-Werror]
In file included from .../src/protocol/http/http_negotiate.c:30:0:
.../src/util/base64.h:8:16: note: expected ‘int *’ but argument is of type ‘size_t *’

On 64-bit big-endian hosts, it might also cause the GSSAPI
implementation to read too much data from memory and disclose it to
some network server, or crash ELinks.
(cherry picked from elinks-0.12 commit d33c807dd9)
2012-11-03 23:01:29 +02:00
Kamil Dudka
5e113362da http_negotiate: do not delegate GSSAPI credentials
CVE-2012-4545.  Reported by Marko Myllynen.
(cherry picked from elinks-0.12 commit da18694ff7)
2012-11-03 23:01:28 +02:00
Kalle Olavi Niemitalo
8b00e1ef70 bug 764: Initialize the right member of union option_value
INIT_OPTION used to initialize union option_value at compile time by
casting the default value to LIST_OF(struct option) *, which is the
type of the first member.  On sparc64 and other big-endian systems
where sizeof(int) < sizeof(struct list_head *), this tended to leave
option->value.number as zero, thus messing up OPT_INT and OPT_BOOL
at least.  OPT_LONG however tended to work right.

This would be easy to fix with C99 designated initializers,
but doc/hacking.txt says ELinks must be kept C89 compatible.
Another solution would be to make register_options() read the
value from option->value.tree (the first member), cast it back
to the right type, and write it to the appropriate member;
but that would still require somewhat dubious conversions
between integers, data pointers, and function pointers.

So here's a rather more invasive solution.  Add struct option_init,
which is somewhat similar to struct option but has non-overlapping
members for different types of values, to ensure nothing is lost
in compile-time conversions.  Move unsigned char *path from struct
option_info to struct option_init, and replace struct option_info
with a union that contains struct option_init and struct option.
Now, this union can be initialized with no portability problems,
and register_options() then moves the values from struct option_init
to their final places in struct option.

In my x86 ELinks build with plenty of options configured in, this
change bloated the text section by 340 bytes but compressed the data
section by 2784 bytes, presumably because union option_info is a
pointer smaller than struct option_info was.
(cherry picked from elinks-0.12 commit e5f6592ee2)

Conflicts:
	src/protocol/fsp/fsp.c: All options had been removed in 0.13.GIT.
	src/protocol/smb/smb2.c: Ditto.
2012-11-03 22:16:32 +02:00
Kamil Dudka
a96d8a17e5 rewrite: add default "ddg" dumb/smart prefixes for DuckDuckGo
... and mention that URI rewriting rules may leak ELinks' identity
in the documentation of protocol.http.user_agent.

Originally requested at <https://bugzilla.redhat.com/856348>.
2012-10-05 14:05:13 +02:00
witekfl
71bd75f759 Avoid a warning when gzip, bzip2 nor lzma is compiled-in. 2012-08-08 22:36:21 +02:00