Philipp Schafft
6cf45fd11d
Fix: Handle 0-byte feasts as no-match
2018-08-08 10:14:04 +00:00
Philipp Schafft
03092d1049
Fix: Do not asume listener->id != NULL when looking for a listener with a specific ID
2018-08-08 09:04:55 +00:00
Philipp Schafft
2d0d496ad4
Fix: Set con->readbuffer = NULL after free()
2018-08-02 09:09:19 +00:00
Philipp Schafft
9cdf5761a0
Update: Added some comments in reportxml.c
2018-07-27 11:55:00 +00:00
Philipp Schafft
3a64ffd2de
Update: Improved comments on reportxml.h
2018-07-27 11:44:00 +00:00
Philipp Schafft
6f02daafbf
Update: Added a huge number of comments to reportxml.h
2018-07-27 11:27:42 +00:00
Philipp Schafft
dd04ef5f77
Update: Added comments to refobject.h
2018-07-27 10:36:59 +00:00
Philipp Schafft
2f938b8500
Fix: set freed pointer to NULL to avoid access-after-free
2018-07-27 10:36:50 +00:00
Philipp Schafft
e900d8e80c
Fix: Fixed end-of-input bug in Base64 encoder
2018-07-27 10:07:30 +00:00
Philipp Schafft
648947fe44
Cleanup: Provided connection_send_bytes() to avoid direct access to con->send()
2018-07-27 10:07:18 +00:00
Philipp Schafft
1c61903793
Feature: Allow <relay> within <mount>
2018-07-26 09:24:08 +00:00
Philipp Schafft
1e230972fa
Feature: Allow <upstream> within <relay> to have a type="" that can be "normal" and "default"
2018-07-26 09:24:01 +00:00
Philipp Schafft
2c8d45310a
Fix: Corrected and improved default value handling for relay upstreams
2018-07-26 09:23:56 +00:00
Philipp Schafft
4b2a062aa0
Feature: Allow actually using more than one upstream
2018-07-26 09:23:52 +00:00
Philipp Schafft
bde17102e2
Fix: Corrected copy function so that number of upstreams is preserved
2018-07-26 09:23:37 +00:00
Philipp Schafft
d61acebf96
Update: Fixed indenting
2018-07-26 09:23:32 +00:00
Philipp Schafft
59697252f0
Feature: Added <upstream>-tag to relay config
2018-07-26 09:23:24 +00:00
Philipp Schafft
fee836f697
Cleanup: Seperated relay upstream parser into seperate function
2018-07-26 09:23:16 +00:00
Philipp Schafft
fd4f28274b
Cleanup: Seperated relay config from runtime data
2018-07-26 09:23:06 +00:00
Philipp Schafft
75314c2b34
Fix: Corrects setup of client_t in client mode.
...
Closes : #2336
2018-07-20 11:41:39 +00:00
Philipp Schafft
c40d12a1c7
Update: Moved _update_client_request_body_length() into new client_complete()
2018-07-20 11:41:37 +00:00
Philipp Schafft
c0155e2404
Fix: Do free connection's putback buffer regardless of it's size
2018-07-20 11:41:03 +00:00
Philipp Schafft
d782eb4c21
Feature: Allow admin commands to have embedded parameters
2018-07-09 10:42:14 +00:00
Philipp Schafft
046bfb9c85
Fix: Removed unused header
2018-07-09 10:41:34 +00:00
Philipp Schafft
43bc709b48
Feature: Added new resource match system
2018-07-09 09:29:54 +00:00
Philipp Schafft
fd2556b4c0
Fix: Corrected use of XMLSTR()
2018-07-09 08:36:48 +00:00
Marvin Scholz
0df3e0eda1
Fix: Correct clearing of XSLT cache entry
...
Fix a double free that could happen when the cache was cleared
during config reload and then subsequent XSLT requests would try
to evict the same cache item, because the item name was not set to
NULL in clear_cache_entry.
Previously this was no problem as a cache entry would only be evicted
on load of a new XSLT and that one would immediately fill in the place
of the old one.
2018-07-09 04:00:18 +02:00
Marvin Scholz
5cd32038d0
Update: Reduce unnecessary config locks in XSLT loader
2018-07-09 03:36:37 +02:00
Marvin Scholz
f52f562e76
Fix: Clear XSLT admin path cache on config reload
2018-07-09 03:36:11 +02:00
Marvin Scholz
450c26a45b
Fix: Convert admin path in XSLT loader to URI
...
The xmlBuildURI function only deals with URIs, not paths, therefore
the admin path has to be converted to a URI first.
2018-07-09 03:35:54 +02:00
Marvin Scholz
858ff390d3
Fix: Remove broken XSLT loader cache invalidation
...
The XSLT loader caches the admin path from the config file and
invalidates it by comparing the stored path with the one in the config.
But to the stored path a / is appended, which means the cache would
always invalidate as it never matches.
2018-07-09 03:35:48 +02:00
Marvin Scholz
c6a8859fbc
Fix: compat: Use stdint on Windows if possible
2018-07-09 03:35:25 +02:00
Marvin Scholz
db95e9c6fc
Fix: Guard include of <sys/select.h>
2018-07-09 03:35:15 +02:00
Marvin Scholz
9897567ea0
Update: Add debug logging for admin auth error
2018-07-09 03:34:53 +02:00
Philipp Schafft
ade6aef0fd
Update: Increased the maximum playlist items default from 4 to 10.
...
Closes : xiph/icecast-server#2332
2018-07-07 10:08:27 +00:00
Philipp Schafft
45d44a6349
Feature: Clear XSLT cache on config reload
2018-07-06 21:40:37 +00:00
Philipp Schafft
3ffe5f4e96
Update: Adding more debugging to XSLT cache
2018-07-06 20:37:18 +00:00
Philipp Schafft
e9140588c6
Cleanup: Formating
2018-07-06 20:27:02 +00:00
Philipp Schafft
6f6499a187
Cleanup: Formating
2018-07-06 20:26:12 +00:00
Philipp Schafft
73f00d5934
Update: Make connection IDs it's own type
2018-07-06 18:43:25 +00:00
Philipp Schafft
d08eba9607
Fix: Fixed report XML related memory leaks
2018-07-06 18:43:10 +00:00
Philipp Schafft
c02f34e989
Fix: Copy XML childs recursively
2018-07-06 18:42:45 +00:00
Philipp Schafft
d9e96a55e7
Feature: Allow <resource> to match on a specific listen-socket
2018-06-30 14:06:05 +00:00
Philipp Schafft
2febabcddd
Update: Corrected copyright
2018-06-30 13:57:37 +00:00
Philipp Schafft
80ffdca7d1
Feature: Allow listen sockets to virtually handle other sockets traffic.
...
This adds on-behalf-of="#id" to <listen-socket>. It allows a socket
to handle the traffic that was originally meant of another (virtual)
listen socket.
2018-06-30 13:51:42 +00:00
Philipp Schafft
7742bf0a21
Fix: Report correct listen URL to client.
...
The URL is constructed considering Protocol, TLS Mode, Host, and Port.
This considers:
- The Host:-header as provided by the client,
- The effective listensocket of the client,
- Global configuration.
This works for:
- Playlist generation,
- Admin authed playlist generation,
- Stats based XSLT.
It also unifies code:
- Default stats values.
Not yet included:
- YP requests.
2018-06-30 13:12:30 +00:00
Philipp Schafft
33588fc9cf
Update: Prepare listensocket_*() API for uses with real listen socket != effective listen socket
2018-06-30 13:10:09 +00:00
Philipp Schafft
58848cbe56
Feature: Allow listen sockets to be of type "virtual"
2018-06-30 13:10:09 +00:00
Philipp Schafft
75be23b550
Fix: Also copy listener type
2018-06-30 13:10:08 +00:00
Philipp Schafft
6ad7f8d3db
Feature: Added id and type property to <listen-socket>
2018-06-30 13:10:08 +00:00
Philipp Schafft
e1f944a3f5
Update: Added comment about global lock in __prepare_shoutcast_admin_cgi_request()
2018-06-30 13:10:08 +00:00
Philipp Schafft
ab8d1639ba
Update: Made listensocket_* perfect thread safe.
2018-06-30 13:10:08 +00:00
Philipp Schafft
fcef3f12d6
Feature: Allow complete reconfiguration of sockets on config reload
2018-06-30 13:10:08 +00:00
Philipp Schafft
b495a407f9
Feature: Added listensocket_container_configure_and_setup() that combines configure and setup into one call
2018-06-30 13:10:08 +00:00
Philipp Schafft
a6ff1cb2d7
Update: Moved compare of two listeners into __listener_cmp()
2018-06-30 13:10:08 +00:00
Philipp Schafft
e661e14bee
Moved config apply on listensocket objects into it's own function
2018-06-30 13:10:08 +00:00
Philipp Schafft
6054f5cce4
Cleanup: Mark static function as inline
2018-06-30 13:10:08 +00:00
Philipp Schafft
8848d74e58
Fix: Correctly detect error condition
2018-06-30 13:10:08 +00:00
Philipp Schafft
4279a6caea
Update: Make use of listensocket_container_set_sockcount_cb() and listensocket_container_sockcount()
...
This fixes the starts-up-with-no-listen-sockets bug.
2018-06-30 13:10:08 +00:00
Philipp Schafft
c401bbcc12
Feature: Added listensocket_container_set_sockcount_cb() and listensocket_container_sockcount()
2018-06-30 13:10:08 +00:00
Philipp Schafft
5490120d4d
Update: Rewrote listen socket handling code comepletly.
...
This moves all the listen socket code into a nice and abstracting file.
Notes:
* Altering listen socket setup does not yet work on config reload.
(Did it ever work?)
* Server will start with no listen sockets. (There are unconfirmed
rumours it sometimes(?) did before.) This is to be re-implemented
in another commit. It can also be improved to work allow checking
on reload or other config changes.
* For slave connections the server address is now checked against
the allow/deny-IP list.
2018-06-30 13:10:08 +00:00
Philipp Schafft
1a426f7f81
Cleanup: Renamed *_TRANSFORMED* to *_HTML*
2018-06-29 15:25:12 +00:00
Philipp Schafft
4e7985c168
Fix: Allocate XML namespace
2018-06-29 13:40:06 +00:00
Philipp Schafft
962805df82
Update: Added attribute "application" for node "extension"
2018-06-29 13:40:03 +00:00
Philipp Schafft
0c7073f04f
Update: Attach definition to childs based on their type
2018-06-29 10:29:22 +00:00
Philipp Schafft
4188bd899f
Feature: Add definition ID to the first child of generated reports
2018-06-29 10:29:19 +00:00
Philipp Schafft
6168573e86
Feature: Render error messages via Report XML and XSLT
2018-06-27 16:07:21 +00:00
Philipp Schafft
7fadb6ce86
Feature: Added function to send XML Report to client
2018-06-27 15:54:31 +00:00
Philipp Schafft
8ea908e332
Feature: Only allow those nodes as childs that are allowed as per specs
2018-06-27 15:54:31 +00:00
Philipp Schafft
5eac0d80ca
Feature: Allow only the correct type of content per node
2018-06-27 15:54:31 +00:00
Philipp Schafft
7ffe12bc8b
Fix: Also copy XML childs when doing a node copy
2018-06-27 15:54:30 +00:00
Philipp Schafft
e24e524cb5
Fix: Access correct object
2018-06-27 15:54:30 +00:00
Philipp Schafft
52429c714f
Feature: Allow attaching XML to extentions
2018-06-27 15:54:30 +00:00
Philipp Schafft
86a62889d2
Feature: Added a way to find a node by attribute (useful for IDs).
2018-06-27 15:54:30 +00:00
Philipp Schafft
32a410bdd6
Feature: Allow xslt_transform() to send non-200 status
2018-06-27 15:54:30 +00:00
Philipp Schafft
d6a9530238
Update: Added useful logging in case report xml database has been loaded
2018-06-27 15:54:30 +00:00
Philipp Schafft
c1c5bd02e3
Fix: Corrected type detection logic for mixed-type <definition>s
2018-06-27 15:54:30 +00:00
Philipp Schafft
fecc38452a
Update: Added useful error message in case of unknown node name
2018-06-27 15:54:30 +00:00
Philipp Schafft
6f9c20e230
Feature: Added global (in config) reportxml database
2018-06-27 15:54:30 +00:00
Philipp Schafft
93897aebb3
Feature: Allow fully recursive lookup of definitions
2018-06-27 15:54:30 +00:00
Philipp Schafft
5d4430a645
Update: Made norec parameter optional
2018-06-27 15:54:30 +00:00
Philipp Schafft
6f8270dcfb
Update: Only look up first child if we really need to.
2018-06-27 15:54:30 +00:00
Philipp Schafft
a014f1c5cc
Feature: Added first level recursive definition lookup
2018-06-27 15:54:30 +00:00
Philipp Schafft
ae489acc93
Fix: Ensure references are counted correctly in case reportxml_node_copy() fails
2018-06-27 15:54:30 +00:00
Philipp Schafft
c4dca907ab
Fix: Use correct data type
2018-06-27 15:54:30 +00:00
Philipp Schafft
d9686e701a
Fix: Free temp memory
2018-06-27 15:54:29 +00:00
Philipp Schafft
c60e957782
Feature: Added a database to store definitions
2018-06-27 15:54:29 +00:00
Philipp Schafft
903ac2f1b3
Feature: Added fundamental report xml handling
2018-06-27 15:54:29 +00:00
Philipp Schafft
5df79580f7
Cleanup: Removed leftover debugging output
2018-06-27 15:52:54 +00:00
Philipp Schafft
b10406df20
Fix: Fixed ICECAST_LOG_DEBUG()'s format string
2018-06-20 12:33:34 +00:00
Philipp Schafft
526ecdaa8b
Updated submodules
2018-06-20 06:43:52 +00:00
Philipp Schafft
b9ff70b589
Fix: Only allow access to "*" for OPTIONS
2018-06-20 06:34:00 +00:00
Philipp Schafft
7e76986741
Update: Added a fast lane for client requests with a small body
2018-06-19 13:44:07 +00:00
Philipp Schafft
59cf2ff426
Cleanup: Removed now useless start-of-stream passing code (as much as I found. There is more)
2018-06-19 13:44:07 +00:00
Philipp Schafft
b8ceef2425
Fix: Fixed some compiler warnings
2018-06-19 13:44:07 +00:00
Philipp Schafft
c3afdff5fb
Feature: Allow POST for web requests
2018-06-19 13:44:07 +00:00
Philipp Schafft
a466900ae1
Feature: Allow POST for admin requests
2018-06-19 13:44:07 +00:00
Philipp Schafft
44ebc3cf22
Update: Added protection against re-queueing a client for reading body that has been queued once already
2018-06-19 13:44:07 +00:00
Philipp Schafft
19dda79146
Update: Added timeout and size limit to client body queue handling
2018-06-19 13:44:07 +00:00
Philipp Schafft
669707d312
Update: Added basic client body slurping
2018-06-19 13:44:07 +00:00
Philipp Schafft
bde88f82ae
Update: Added debug level logging for client slurping
2018-06-19 13:44:07 +00:00
Philipp Schafft
e9624ef523
Cleanup: Removed unused structure
2018-06-19 13:44:07 +00:00
Philipp Schafft
1c7329cfbf
Feature: Added some client request body slurping helpers
2018-06-19 13:44:07 +00:00
Philipp Schafft
b0c7da36a0
Fix: Fixed HTTP/1.1 pipelineing
2018-06-19 13:44:07 +00:00
Philipp Schafft
33dcf24d21
Fix: Only reuse client IF we reached the end of it's body
2018-06-19 13:44:07 +00:00
Philipp Schafft
01c35e2c41
Feature: Check if we know client's body length. If so do not allow reading more than it.
2018-06-19 13:44:07 +00:00
Philipp Schafft
f370e88335
Feature: Implemented a way to put back data read from a connection
2018-06-19 13:44:07 +00:00
Philipp Schafft
460477230d
Feature: Consider encoding backend EOF state
2018-06-19 13:44:07 +00:00
Philipp Schafft
38436c3f6e
Update: Abstract body read with client_body_read() and client_body_eof()
2018-06-19 13:44:07 +00:00
Philipp Schafft
ece3786a0a
Fix: Check if we actually have source->client->con in case we want to access source->client->con->tls
2018-06-19 13:44:06 +00:00
Philipp Schafft
551a36e43b
Fix: Added handling of newcb and freecb
2018-06-19 12:56:40 +00:00
Philipp Schafft
38c71f7673
Feature: Allow modules to handle client requests via <resource> tags
2018-06-19 12:56:40 +00:00
Philipp Schafft
f02c23a593
Fix: Corrected reference counters
2018-06-19 12:56:40 +00:00
Philipp Schafft
5d815f2205
Feature: Added a global module container object
2018-06-19 12:56:40 +00:00
Philipp Schafft
bb77660020
Feature: Added infrastructure for modules. Currently not used by Icecast at all.
2018-06-19 12:56:40 +00:00
Philipp Schafft
d745d02f4b
Cleanup: Removed unused member
2018-06-19 10:47:49 +00:00
Philipp Schafft
513b62aeea
Cleanup: Fixed some compiler warnings
2018-06-19 10:47:03 +00:00
Philipp Schafft
ea42a12efb
Fix: Fixed regression in htpasswd auth detecting no user list.
...
This fixed a regression caused by 4828c07d6b
.
The patch was also applied into release-2.4.4 as c5201770b6
.
However the patch for release-2.4.4 was correct. So no regression there.
2018-06-19 09:09:16 +00:00
Philipp Schafft
a3f29ae42a
Update: Renamed "parent" to "associated" to make it more generally useful
2018-06-17 13:17:05 +00:00
Philipp Schafft
4e1dc94c50
Feature: Added some useful macros to refobject API
2018-06-17 13:16:07 +00:00
Philipp Schafft
ac372a2edc
Fix: Do free the base of a refobject as well
2018-06-17 13:13:10 +00:00
Philipp Schafft
48c3ce52b3
Fix: Corrected used headers
2018-06-17 13:12:59 +00:00
Philipp Schafft
7cba708a50
Feature: Make refobject more general useful
2018-06-17 13:12:51 +00:00
Philipp Schafft
a9d391ffbc
Feature: Added generic reference object
2018-06-17 13:12:21 +00:00
Philipp Schafft
059bfdc7ce
Cleanup: Corrected headers used in code
2018-06-17 12:47:35 +00:00
Philipp Schafft
5c3e7760c5
Cleanup: Corrected headers used in headers
2018-06-17 12:28:38 +00:00
Philipp Schafft
8b86373e32
Cleanup: Moved types from "cfgfile.h" to "icecasttypes.h"
2018-06-17 12:15:18 +00:00
Philipp Schafft
aeaa91f633
Cleanup: Moved types from "connection.h" and "slave.h" to "icecasttypes.h"
2018-06-17 11:42:20 +00:00
Philipp Schafft
34b10657da
Cleanup: Make use of "icecasttypes.h"
2018-06-17 10:33:10 +00:00
Philipp Schafft
e467f6e31b
Cleanup: Make use of "icecasttypes.h" in format*.[ch]
2018-06-17 10:26:34 +00:00
Philipp Schafft
65f5eb9771
Cleanup: Make use of "icecasttypes.h" in connection.[ch]
2018-06-17 10:22:17 +00:00
Philipp Schafft
7893fc7560
Cleanup: Removed unused forward declaration
2018-06-17 10:21:33 +00:00
Philipp Schafft
f8e1ed0827
Cleanup: Removed unused forward declaration
2018-06-17 10:16:07 +00:00
Philipp Schafft
0adab82a71
Update: Moved ice_config_t into "icecasttypes.h"
2018-06-17 10:15:32 +00:00
Philipp Schafft
6ffc893b6a
Update: Move most common types into "icecasttypes.h"
2018-06-17 10:12:15 +00:00
Philipp Schafft
50a9d3382a
Update: Added a header for commonly used types
2018-06-17 09:43:55 +00:00
Philipp Schafft
41ab50dc9a
Update: Include <config.h> as we need it
2018-06-17 08:57:31 +00:00
Philipp Schafft
6136810f27
Fix: Corrected const for SSL_METHOD*.
...
I did this for OpenSSL 1.0.1t (0x1000114fL) as I don't
know which was the first affected version.
2018-06-16 18:40:04 +00:00
Philipp Schafft
d1dbc561ac
Update: Announce support for OPTIONS
2018-06-16 17:59:11 +00:00
Philipp Schafft
0bb65ed090
Feature: Allow OPTIONS on admin requests
2018-06-16 17:59:11 +00:00
Philipp Schafft
2bd71b9d01
Feature: Allow OPTIONS request for * and web requests
2018-06-16 17:59:11 +00:00
Philipp Schafft
6f7881a875
Update: Allow update of pidfile on the fly.
2018-06-16 17:53:29 +00:00
Philipp Schafft
a2763ac9e4
Update: Improved pidfile error handling
2018-06-16 17:51:16 +00:00
Philipp Schafft
23cc8a9646
Cleanup: Mark local functions static
2018-06-16 17:51:16 +00:00
Philipp Schafft
be0bf035c7
Update: Added comments to make code easier to understand
2018-06-16 17:38:35 +00:00
Philipp Schafft
2b3f07e9b0
Feature: Allow using default config filename.
...
This uses the new configure option --with-default-config=PATH.
2018-06-16 17:33:14 +00:00
Philipp Schafft
452c2b17d3
Fix: Use size_t not int
2018-06-16 17:30:42 +00:00
Philipp Schafft
beb4523b84
Cleanup: Replaced magic number with sizeof()
2018-06-16 17:29:51 +00:00
Philipp Schafft
8a69db3ab7
Update: Allow running as root IF Icecast has PID=1
2018-06-16 17:28:42 +00:00
Philipp Schafft
cc0f62df89
Update: Log PID on process startup.
2018-06-16 17:27:59 +00:00
Philipp Schafft
55e34b3b52
Fix: Removed erroneously defined types
2018-06-16 14:30:46 +00:00
Philipp Schafft
02fb2aa97b
Fix: Corrected the include of <stdint.h> and <inttypes.h> to match IEEE Std 1003.1-2017 ("POSIX 7")
2018-06-16 15:34:56 +02:00
Philipp Schafft
fd1f34c1e2
Cleanup: HAVE_AUTH_URL -> HAVE_CURL
2018-06-16 15:34:56 +02:00
Philipp Schafft
8b3372e085
Cleanup: Removed unused (and broken?) libkate support from format_kate.c
2018-06-16 15:34:56 +02:00
Marvin Scholz
39a0ca8491
Makefiles cleanup
2018-06-16 15:34:56 +02:00
Marvin Scholz
3b5d5b7b93
Makefile formatting improvements
2018-06-16 15:34:56 +02:00
Marvin Scholz
af608dd120
Remove debug and profile targets
2018-06-16 15:34:56 +02:00
Marvin Scholz
3f7d218576
Remove automake options from makefiles
2018-06-16 15:34:56 +02:00
Marvin Scholz
61ac5f9b9c
Rewrite configure.ac
...
This rewritten configure.ac is nearly independent of any of the xiph m4
macros, most of which are ancient and can nowadays easily replaced
with pkg-config.
2018-06-16 15:34:56 +02:00
Philipp Schafft
822057ca57
Feature: Allow registering new admin commands on the fly
2018-06-09 12:43:09 +00:00
Philipp Schafft
bc38c93545
Update: Check admin command table before use
2018-06-09 12:43:09 +00:00
Philipp Schafft
86154bc6d9
Feature: Set foundation for having multiple admin/ sub-directories
2018-06-09 12:43:09 +00:00
Philipp Schafft
9fb26c4607
Fix: Allow non-1-byte PATH_SEPARATOR in admin_send_response()
2018-06-09 11:11:29 +00:00
Philipp Schafft
442960ac4a
Feature: Added admin format ADMIN_FORMAT_AUTO
2018-06-09 10:43:57 +00:00
Philipp Schafft
88ca36545e
Update: Converted the response format for admin requests into a enum
2018-06-09 10:34:34 +00:00
Philipp Schafft
91134b75c0
Fix: Fixed memory leak with new prefixmatch="" attribute of <resource>
2018-06-06 10:50:56 +00:00
Philipp Schafft
819dc9c72e
Fix: Fixed memory leak with new way of sending requests to corresponding endpoints
2018-05-28 14:59:47 +00:00
Philipp Schafft
9b8ca49f99
Cleanup: Dispatch admin requests not as part of GET request handling but more general
2018-05-28 14:59:43 +00:00
Philipp Schafft
728ed8575d
Cleanup: Massive cleanup of the <resource>-tag handling
2018-05-28 14:45:54 +00:00
Philipp Schafft
07ee2814e0
Cleanup: Renamed alias -> resource
2018-05-28 14:45:49 +00:00
Philipp Schafft
29c0501237
Feature: Allow prefix matching aliases
2018-05-28 14:45:35 +00:00
Philipp Schafft
6c0b0e2976
Update: Make the alias dereferencing loop more easy
2018-05-28 14:45:06 +00:00
Philipp Schafft
306cc58d74
Cleanup: Removed useless #includes
2018-05-28 14:32:46 +00:00
Philipp Schafft
4f90399257
Fix: Corrected includes. Made stuff that worked by accident actually work
2018-05-28 14:31:36 +00:00
Philipp Schafft
651ece018c
Update: Corrected Copyright statements
2018-05-28 14:19:55 +00:00
Philipp Schafft
097e62394f
Update: Made error IDs an enum.
...
Thanks to ePirat for the suggestion.
2018-05-26 06:29:10 +00:00
Philipp Schafft
a612d0c4a1
Fix: Fixed log level for auth internal debug message
...
Thanks to ePirat.
2018-05-26 06:17:56 +00:00
Philipp Schafft
4828c07d6b
Fix: Fixed segfault in htpasswd auth if no filename is set
2018-05-26 06:07:24 +00:00
Philipp Schafft
00cb6b0042
Fix: Do not report passwords at all
2018-05-20 19:35:45 +00:00
Philipp Schafft
465aac14f3
Fix: Do not report hashed user passworts in user list.
2018-05-20 19:35:44 +00:00
Philipp Schafft
42b24d1840
Fix: Shut down TLS before closing socket.
...
We should first shut down TLS so we can signal the other end a clean shutdown
in contrast to a socket failure.
Big thanks to wget(1) to find it. Fantastic tool.
2018-05-20 14:40:01 +00:00
Philipp Schafft
0fe5d5fa1f
Fix: Added missing status codes to header generator
2018-05-07 16:33:17 +00:00
Philipp Schafft
1c3b10e07a
Update: mark internal table static
2018-05-07 16:33:06 +00:00
Philipp Schafft
4b190d2481
Feature: Added per Error UUID. Also formats error pages nicer
2018-05-07 16:32:56 +00:00
Philipp Schafft
b42378abc4
Feature: Generate errors based on IDs.
...
This generates error pages based on IDs. This allows to reuse errors
and add more advanced information to them.
This patch also makes Icecast send in plain text OR HTML based
on the clients Accept:-string.
2018-05-07 16:28:46 +00:00
Marvin Scholz
cf21756035
Refactor admin.c handlers
2018-05-06 14:22:51 +02:00
Marvin Scholz
e99ebfae3a
Move helper macros in admin.c to the top
2018-05-05 07:26:37 +00:00
Philipp Schafft
0db820c9dd
Feature: Added parser for Accept*:-headers
2018-05-05 06:42:56 +00:00
Philipp Schafft
3b55f16977
Updated submodules
2018-05-05 06:42:56 +00:00
Philipp Schafft
bcc0e86ca0
Fix: Fixed regression for ICY source client's auth
...
This allows ICY source clients to log in again with 2.4.x-style config.
ICY does not provide a username. Therefore the username was unset.
This patch sets the username for ICY source connections and allow them
to be handled as if a username was provided.
Configuration tag <shoutcast-user> was added to select the username to set
to. This defaults to "source".
2018-05-05 06:42:56 +00:00
Philipp Schafft
578366e541
Cleanup: Removed useless stats_event()
2018-05-05 06:42:56 +00:00
Philipp Schafft
5d603a01d8
Fix: Fixed a segfault when xsltApplyStylesheet() returns error
2018-05-05 06:42:42 +00:00
Philipp Schafft
fb3678b0ca
Fix: Do not access request type when we have no parser (slaves)
2018-05-05 06:42:34 +00:00
Philipp Schafft
514e825a81
Fix: Corrected response and fixed TLS for 416 Request Range Not Satisfiable responses
2018-04-21 11:06:48 +00:00
Philipp Schafft
be407ebbc7
Fix: Unbreak TLS for ICECAST_PROTOCOL_SHOUTCAST source clients
2018-04-21 11:06:42 +00:00
Philipp Schafft
2c32f02083
Update: Code style
2018-04-13 18:48:03 +00:00
Philipp Schafft
698186608b
Fix: Send "Content-Length: 0" on 100-continue
2018-04-13 13:43:36 +00:00
Philipp Schafft
e099f80af1
Fix: Only report one Upgrade:-Header on upgrade
2018-03-28 15:10:05 +00:00
Philipp Schafft
789dd06762
Feature: Export used protocol in status XML
2018-03-01 10:41:52 +00:00
Marvin Scholz
51edb020a7
Makefile: Add missing tls.h to header files
...
This fixes make distcheck and the distribution tarballs, those
were previously lacking this header which caused builds to fail.
2018-01-13 21:43:32 +01:00
Philipp Schafft
cd9c8420d3
Feature: Added new config tag tls-context, tls-key and attribute implementation
2017-07-23 13:14:48 +00:00
Philipp Schafft
ac92af50c5
Fix: Corrected typo
2017-07-23 13:14:48 +00:00
Philipp Schafft
b47ae369b6
Update: Prepare code for a new <tls-context> element
2017-07-23 13:14:48 +00:00
Philipp Schafft
68b3b1c72a
Feature: Added function to check for specific TLS implementation
2017-07-23 13:14:48 +00:00
Philipp Schafft
9cbc110f78
Fix: Do not announce Upgrade to TLS on TLS Mode DISABLED sockets
2017-07-23 13:14:48 +00:00
Philipp Schafft
a864fbf47a
Make tls mode more configureable
2017-07-23 13:14:48 +00:00
Philipp Schafft
d7cd12de75
Cleanup: Wording and object names from SSL to TLS
2017-07-23 13:14:48 +00:00
Philipp Schafft
e513f09b85
Typo: openSSL->OpenSSL
2017-07-23 13:14:48 +00:00
Philipp Schafft
3376498e5e
Update: completly abstracted OpenSSL into tls.[ch]
2017-07-23 13:14:48 +00:00
Philipp Schafft
a1aa0196b2
Feature: Allow to use of non-TLS sockets for TLS clients
2017-07-23 13:14:48 +00:00
Philipp Schafft
1d39b657da
Feature: Allow reloading TLS key on the fly
2017-07-23 13:14:48 +00:00
Philipp Schafft
a6eb48e44d
Update: Abstracted TLS support in tls.c
2017-07-23 13:14:48 +00:00
Philipp Schafft
64b16f8296
Update: Abstracted the TLS context code into tls.c
2017-07-23 13:14:48 +00:00
Philipp Schafft
53e95727b4
Update: Code style
2017-01-22 08:52:57 +00:00
Philipp Schafft
89804764b0
Fix: Do not segfaul on bad Opus streams
2017-01-22 08:52:57 +00:00
Philipp Schafft
5b512da304
Cleanup: corrected debug output of Opus support
2017-01-22 08:52:56 +00:00
Philipp Schafft
0d7f81b75a
Feature: Added support to extract metadata from Opus streams.
...
This adds support to read metadata from Ogg/Opus streams:
* Original sample rate from OpusHead,
* number of channels from OpusHead,
* Tags from OpusTags.
2017-01-22 08:52:56 +00:00
Philipp Schafft
84124c313a
Update: Added spaces to output of auth_result2str().
...
This adds spaces into the strings such as "nomatch" (-> "no match")
as returned by auth_result2str(). This is to improve readability of
resulting logfiles by most uses.
2017-01-22 08:38:01 +00:00
Philipp Schafft
e75b1a1612
Fix: Corrected number of arguments for ICECAST_LOG_INFO()
...
This fixes the number of arguments for ICECAST_LOG_INFO().
Why doesn't GCC warn about this?
2017-01-22 08:38:01 +00:00
Philipp Schafft
f5dd306f71
Update: improved auth related logging
2017-01-22 08:38:01 +00:00
Philipp Schafft
ce2b4195da
Fix: Fixes a number of empty string segfaults in config parser
...
This fixes a number of segfault happening in case config tags are
empty. This patch also adds warnings for most cases.
Please test for any regressions.
This should likely be ported to 2.4.4 as well.
Closes : #2265
2016-11-30 11:22:36 +00:00
Thomas B. Ruecker
70265c466e
Spelling fix, thanks to Ukikie
2016-11-23 20:36:53 +00:00
Philipp Schafft
b3b1dd12a1
Workaround: This avoids libspeex printing warnings on Opus streams.
...
libspeex reports warnings in case of oddnesses with the data to stderr.
However Icecast2 uses those functions in it's codec probeing process.
This way libspeex will write messages to a posibily reused random handle.
This is clearly a bug by package maintainers of libspeex.
See the source code of this change as well as libspeex's source code
as reference.
2016-10-29 11:42:52 +00:00
Philipp Schafft
72075d0d0d
Fix: Fixed regression introduced by r19250.
...
This fixes the regression introduced by r19250 (461a537561
).
The fix checks if the source client is actually known before printing it's IP-Address.
See also: #2016
2016-09-04 11:38:07 +00:00
Marvin Scholz
4117a2d2e2
Config: Rename mp3-metadata-interval to icy-metadata-interval
...
As proposed in #2272 , this renames the mount specific
mp3-metadata-interval to icy-metadata-interval to prevent
confusion about what it does (setting the icy metadata
interval) and to make clear it's not mp3 specific but ICY
specific.
2016-06-28 11:39:57 +00:00
Marvin Scholz
4345060c02
Cleanup: corrected usage of spaces
2016-06-07 11:30:46 +00:00
Philipp Schafft
834de5ba77
Fix: allow building without libcurl support
2016-04-19 15:13:12 +00:00
Marvin Scholz
43658deb37
Add log message for succesful streamlist requests
2016-04-13 10:12:39 +02:00
JRS
a552c6e667
Fix update_from_master() for receiving HTTP/1.1
...
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
2016-04-13 09:57:00 +02:00
Philipp Schafft
c8f565b030
Update: SECURITY File extension check for trailing characters
...
This changes the file extension check in a way that it no longer
ignores trailing characters. This significantly reduces the risk
for false positives while matching. However this invalidates old
setups with files like foo.xsl3. However I have never files like
that in the wild.
This is based on the patch privided by ePirat in ticket #2248 .
See: #2248
2016-03-27 17:51:59 +00:00
Joseph Wallace
a2cac3ee93
Make ebml_parse_tag return tag ID code
...
(applying lessons learned from libshout)
2016-03-27 12:29:23 -04:00
Joseph Wallace
a218055158
Move tag-parsing bail conditions to top for clarity.
2016-03-27 12:29:23 -04:00
Joseph Wallace
78293f0485
Delete some debugging comments.
2016-03-27 12:29:06 -04:00
Joseph Wallace
dcbba0c600
Cleanup some signed-type issues in format-ebml.c
2016-03-27 12:29:06 -04:00
Philipp Schafft
9cae2ef646
Updated submodules
2016-03-27 13:16:23 +00:00
Joseph Wallace
788bd94eeb
BUGFIX: Use a signed type for capturing the return value of client_read_bytes()
...
Signed-off-by: Marvin Scholz <epirat07@gmail.com>
2016-02-13 21:12:34 +01:00
Marvin Scholz
3a73f9c146
More hardening of XML output against invalid entities
...
This replaces the add node function with the one intended for text nodes
to prevent that invalid entities are not encoded and therefore could
break the XML output.
(See d739c65e54
and #2255 )
2016-02-10 20:56:56 +01:00
Thomas B. Ruecker
4c57532e7b
Added missing space to fix output
2016-02-10 08:15:48 +00:00
Marvin Scholz
37150fe020
Fix STATS legacy authentication
...
This fixes the issue that auth for STATS method always fails, by
adding stats method to legacy admin auth in cfgfile.c
2016-02-09 20:27:10 +01:00
Marvin Scholz
d739c65e54
Fix invalid entities in listclient xml
...
This fixes a bug where listener Referer or User-Agent strings containing
a sequence like `&T;` was not escaped properly and therefore made the
whole XML document invalid.
Injecting new XML nodes (<foo></foo>) was not possible, it seems in the
worse case all it could cause was that the XML failed to parse.
Fix #2255
2016-02-08 23:02:02 +01:00
Philipp Schafft
235527192c
Merge branch 'webmKeyFrames'
2016-02-06 17:44:56 +00:00
Marvin Scholz
eecbc647b4
Fix handling of URIs in custom XSL loader
...
There was an error how URIs were handled in our custom XSL loader
that rewrites include URIs to point to admin dir if the include
is not found in the current dir.
The check for the file would not work if the path contains chars
that are usually escaped in URIs, like a space (%20), as we get
a already encoded version of that URI in the loader and did not
decode it before checking the existence of the file.
(Fix #2249 )
2016-01-26 10:13:07 +01:00
Philipp Schafft
471cbaa60b
Fix: remove tailing dots in URI.
...
This works around the problem that windows ignores tailing dots.
This way you could trick Icecast2 to send a XSLT file as plain text.
Please test.
Closes : #2247
2015-12-24 00:38:11 +00:00
Joseph Wallace
d196e75416
Convert ints used as boolean values into actual bools.
2015-12-19 15:32:37 -05:00
Joseph Wallace
1f6a0a497f
Replace "long long"s with an appropriate type from <stdint.h>
2015-12-19 15:02:33 -05:00
Philipp Schafft
255af9e610
Fix: Moved <mime-types> into <paths>.
...
This moved the <mime-types> setting into <paths>. The code still
supports reading it from the root element but will warn the user
about this.
Also there seems to be no documentation about this setting.
Closes : #2164
2015-12-12 08:17:58 +00:00
Joseph Wallace
de004670c3
Be clearer about ebml_parse_sized_int's sign & endian behavior.
2015-12-01 02:21:24 -05:00
Philipp Schafft
d3370f3d1c
Cleanup: unify util.c a bit with libshout.
2015-11-28 17:58:18 +00:00
Joseph Wallace
e6cb7e26ee
Move ebml-private structure definitions out of header file.
2015-11-28 12:49:54 -05:00
Joseph Wallace
0d7448efc7
Change buffer-related sizes & indices to size_t or ssize_t, as applicable.
2015-11-28 12:49:45 -05:00
Joseph Wallace
8a09627d05
Fix type of copy_state in EBML parser to an enum variable.
2015-11-28 12:41:46 -05:00
Joseph Wallace
dc263858a4
Additional format_ebml.c comments.
2015-11-28 12:41:46 -05:00
Joseph Wallace
af238d9129
Move MKV element magic values into proper #define constants.
2015-11-28 12:41:46 -05:00
Joseph Wallace
d394a244f0
Bugfix: Cluster test could have read past the end of the input buffer.
...
Move the cluster test inside the space-to-read check with the other tests.
2015-11-28 12:41:46 -05:00
Joseph Wallace
9de8fe483d
Remove spare whitespace on blank lines.
2015-11-28 12:41:46 -05:00
Joseph Wallace
e4258bfad3
Don't wait for video keyframes on audio-only streams.
2015-11-28 12:41:46 -05:00
Joseph Wallace
9cf4ed560c
Probe SimpleBlocks to determine which clusters start with a keyframe.
2015-11-28 12:41:45 -05:00
Joseph Wallace
6e11db5de2
Probe Tracks section of header to identify the video track.
...
We'll sync keyframes on that track next commit.
2015-11-28 12:41:45 -05:00
Joseph Wallace
9899413839
Add parser for bodies of Integer elements.
2015-11-28 12:41:45 -05:00
Joseph Wallace
f461ff6763
Buffer clusters to have time to probe them for metadata, like keyframes.
2015-11-28 12:41:45 -05:00
Joseph Wallace
def5a4cf6c
Implement EBML-aware parser.
...
* Loop over elements in input buffer.
* Most are literally copied with their contents without
inspection into the header or data buffers as appropriate.
* Some only copy the element header, to allow inspecting
children elements.
* Cluster elements are identified and used as sync points.
No probing is done for keyframes *yet*
2015-11-28 12:41:45 -05:00
Joseph Wallace
50c4984c78
Add functions to comprehend EBML tags.
2015-11-28 12:41:45 -05:00
Joseph Wallace
531d060d16
Adjust EBML parser writing protocol.
...
This will allow leaving unparsed data in the input buffer to wait for completion.
2015-11-28 12:41:45 -05:00
Joseph Wallace
13dc880d29
Yield sync point status from ebml_read directly.
...
This simplifies some fragile "was the last chunk a sync point?" logic.
2015-11-28 12:41:45 -05:00
Joseph Wallace
744b66c40e
Make the state-machine nature of the EBML parser more evident.
2015-11-28 12:41:45 -05:00
Joseph Wallace
15e7fc6e4a
Add comments & braces to format_ebml.c.
...
This should help make future changes to the code clearer.
2015-11-28 12:41:45 -05:00
Marvin Scholz
2ff8c50d3b
Makefile: Fix commons include path
2015-11-28 17:15:42 +01:00
Marvin Scholz
d16e091e25
Update submodule for more deprecated Makefile INCLUDES fixes
2015-11-28 17:15:42 +01:00
Marvin Scholz
d3c1dafa7e
Change deprecated INCLUDES variable in Makefile
2015-11-28 17:15:42 +01:00
Philipp Schafft
24bc25ec38
Cleanup: fixed some compiler warnings
2015-11-28 11:30:34 +00:00
Philipp Schafft
d51b9afc49
Cleanup: unify util.h a bit with libshout.
2015-11-28 10:51:50 +00:00
Philipp Schafft
32216013b2
Cleanup: unify util.c a bit with libshout.
2015-11-28 10:44:05 +00:00
Philipp Schafft
85b709da04
Merge branch 'matchfile'
2015-11-23 13:01:23 +00:00
Philipp Schafft
752b2f90fe
Cleanup: mark constant loopup tables read only
2015-11-23 12:47:56 +00:00
Philipp Schafft
a650965cfd
Cleanup: make util_base64_encode() useful for binary data.
2015-11-23 12:47:47 +00:00
Philipp Schafft
de48bdd13f
Cleanup: Removed unused member host vom connection struct
2015-11-23 11:44:14 +00:00
Philipp Schafft
69cf9ad6c2
added <errno.h> as we use errno
2015-11-23 11:41:25 +00:00
Philipp Schafft
b7d0188e1d
Update: updated submodules
2015-11-22 18:52:15 +00:00
Philipp Schafft
c0e895404e
Cleanup: mark key as const (why wasn't it const already?)
2015-11-22 18:47:11 +00:00
Philipp Schafft
b55bae035d
Update: Improved matchfile API
...
This adds support for allow-deny kind of rules with the matchfile API.
See: #2119
2015-11-22 18:47:06 +00:00
Philipp Schafft
d24dda61d0
Cleanup: moved ban and allow file support into generic implementation
...
ban and allow file support has been moved into a generic implementation
that can be re-used by later code such as proxy matching or other
blacklisting.
See: #1959
2015-11-22 18:47:00 +00:00
Philipp Schafft
3653a1f812
updated submodules
2015-11-19 10:47:08 +00:00
Philipp Schafft
8e2fe8a3f7
Fix: Handle mount=NULL in config_find_mount() correctly.
2015-11-11 12:18:15 +00:00
Philipp Schafft
f5d728d730
Fix: Include required headers
2015-08-10 08:54:21 +00:00
Marvin Scholz
16dac2505e
Fix that global listener count could be negative under certain circumstances
...
This fixes a bug that could cause the global listener count of Icecast to
be negative. This was caused due to wrong handling of errors in the
format_prepare_headers function.
Fixes : #2199
Thanks a lot to Simeon Völkel (0xBD4E031CDB4043C9) for reporting
and investigating the bug.
2015-06-06 14:09:44 +02:00
Marvin Scholz
c35760cd50
Fix possible segfaults when header allocation fails
...
This fixes some possible segfaults that could happen if the header
(re)allocation fails.
2015-06-06 14:09:44 +02:00
Philipp Schafft
3d2ab9aec2
Fix: Handle case realloc() is used as free().
...
This (hopefully) corrects the usage of realloc() as free().
This patch is part of the series based on Denis Denisov's input.
2015-04-08 13:05:10 +00:00
Philipp Schafft
6605f4ddaa
Fix: Let util_url_escape() handle NULL parameter.
...
This let util_url_escape() handle NULL passed as parameter.
In case the parameter is NULL it will also return NULL.
This patch also does some cleanup of the code such as migration
away from int and thus avoiding future failtures.
This is a re-apply of 3baa4e46aa
as git refuses to cherry-pick.
2015-04-08 10:25:25 +00:00
Philipp Schafft
c1f0eaff8a
Fix: Fixed some smaller bugs such as leaks and performance improvements.
...
This is a first commit to correct minor problmes reported by
Denis Denisov. There is likely another commit to correct some more
such problems.
Thank you Denis Denisov.
2015-04-08 09:36:59 +00:00
Philipp Schafft
7402383448
Cleanup: move libcurl specifc code into curl.c
...
This cleans the libcurl usage up a bit. It moves common code used
to interact with libcurl into a single new file curl.[ch].
Notes:
* It does not alter any features nor fixes any bugs.
* Thew REVIEW about strdup(self->url) in event_url.c as been processed.
According to the manpage for curl_easy_setopt()/CURLOPT_URL
there is no need for us to copy.
* URL Auth as well as URL triggers have sent ICECAST_VERSION_STRING
as User-Agent:, this has be corrected to what is set in the config
file.
* As curl.c is now a single point for setting parameters all the TLS
parameters should be reviewed and set (based on config).
Please test!
2015-04-08 07:44:36 +00:00
Philipp Schafft
a1f204c184
Cleanup: Renamed <kartoffelsalat> to <event-bindings>
...
The parent element for <event> was renamed from <kartoffelsalat>
to <event-bindings> as discussed on the mailinglist and on IRC.
2015-03-31 08:20:37 +00:00
Philipp Schafft
2661d4360e
Cleanup: More space corrections
2015-03-31 08:14:42 +00:00
Philipp Schafft
8455dbde57
Cleanup: corrected a space
2015-03-31 08:03:28 +00:00
Philipp Schafft
bfbb8f207c
Feature: playlist history for ICY based streams.
...
This patch adds support for history for ICY based streams.
Of cause this has the same limits for metedata as ICY has.
See: #766
2015-03-28 18:14:41 +00:00
Philipp Schafft
961453b0de
Added config option for history size.
...
This adds a <max-history> config option to the <mount> section.
Default is a history size of 4.
See: #766
2015-03-28 17:34:35 +00:00
Philipp Schafft
06fe442c2d
Fixed off-by-one error in playlist truncation.
...
The playlist truncation (may_tracks) was off by one.
This fixes the problem.
2015-03-28 17:33:09 +00:00
Philipp Schafft
5f77b35d14
Initial patch for playlist history support.
...
This allows to store a history of played songs along the source
object and report it as part of the status XML.
Additional work needs to be done to make this configurable.
Also format_mp3.c needs work to support this.
A generic song changed handler should be implemented to handle this
in a nice way.
That one should also be the point to call logging_playlist().
See: #766
2015-03-28 16:15:49 +00:00
Philipp Schafft
8d513db405
Added operation mode (omode) "strict".
...
This adds the operation mode "strict". It does not yet have
any specific features and alias the "normal" mode.
This change is mostly to make the setting of "strict" valid
so it can be used already.
2015-03-27 11:15:22 +00:00
Philipp Schafft
5dac23adda
Renamed config file SSL references to TLS.
...
As we do not support any SSL version but TLS this renames
all TLS related config options. Docs still need to be updated.
Close still uses 'ssl' internally e.g. for variable names.
This should be changed on a later patch.
2015-03-27 11:08:50 +00:00
Thomas B. Ruecker
99e11adac3
Remove stray space that managed to sneak in
2015-03-01 17:11:31 +00:00