1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-30 06:35:23 +00:00
Commit Graph

1272 Commits

Author SHA1 Message Date
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
Thomas B. Ruecker
671c2366cf Fixed log messages and comments
* Reworded many log messages for better understanding.
 * Adjusted some version targets as we won't have a 2.4.2 release.
 * Added some FIXME comments
2015-03-01 16:55:27 +00:00
Thomas B. Ruecker
314aa9660d remove some spurious tabs and replace with spaces
Fix variable alignment if necessary.
2015-03-01 16:55:27 +00:00
Philipp Schafft
c1034058f6 Fix: do not close(-1) on Keep-Alive clients 2015-03-01 16:53:17 +00:00
Philipp Schafft
5e8b24785e Fix: Use correct malloc function 2015-03-01 15:53:57 +00:00
Philipp Schafft
e870c21384 Cleanup: some style corrections. 2015-03-01 15:52:37 +00:00
Marvin Scholz
e0c05ef8a9 Fix another memory leak in xslt loader
This fixes another memory leak, which was caused by not freeing
the admin_path when a subsequent xslt file was loaded.
2015-03-01 15:35:14 +01:00
Marvin Scholz
06545b25c0 Fixed memory leaks in custom xslt loader
This fixes some memory leaks in the xslt loader,
additionally it now makes no copy of the URI if not needed.
2015-03-01 14:30:19 +01:00
Marvin Scholz
0709b4e66d Only look for admin include if no local found
This switches the behaviour introduced with the last commit
so that now the admin folder is only checked for includes if
in the specified path none is found.
2015-02-25 16:11:42 +01:00
Marvin Scholz
5b416b311c Add support for 'admin' includes from web XSLT files
This adds support for including xslt files that are in the admin
directory in an xslt file which is in the webroot, without having to
specify the full path.

For example:

    <xsl:include href="includes/head.xsl"/>

will look inside the admin directory (foo/bar/admin/includes/header.xsl)
and include it, if it's found. If not it will as usual look for it in
the directory where the xslt file is located. This enables us to have
common files like the header, footer, json stuff, etc. in the admin
directory, so we don't need to have an extra copy in the web folder.

Note:
The configuration value for the admin directory is requested
every time an xslt is requested (if not in the cache).
Additonally it should be noted that the includes are not cached.
2015-02-25 15:49:01 +01:00
Philipp Schafft
225c6f240a Fix: do not FTBFS in case OpenSSL support is not compiled in 2015-02-23 21:43:07 +00:00
Philipp Schafft
1e80611d1c Sync submodules 2015-02-10 21:26:33 +00:00
Philipp Schafft
a1e5d2ab8a Cleanup: connection.c:776: warning: unused variable expectcontinue 2015-02-10 21:20:58 +00:00
Philipp Schafft
36d10121cf Feature: Support PUT with chunked transfer encoding.
This adds the Transfer-Encoding chunked to PUT support.

Please test carefully. Will add PUT to Allow: header after testing.

Have fun.

Closes: #2088
2015-02-10 21:18:52 +00:00
Philipp Schafft
79cb147c4a Cleanup: unbreak 100-continue a bit.
This tries to unbreak the 100-continue thing a bit.
Proper headers are send in case of 100-continue. Also the 200 OK
was moved to the end of the stream.
The client may even be reused. But I'm not sure we only do
'End of stream' in cases we are not on an undefined state of the
client. Do we as of now support anything that give us EOS without
a fatal socket state (error or shutdown)?

At least this unbreaks 100-continue with active TLS that was broken
as hell as we sent the header in clear over the socket. Not checking
if it was transmitted completly or something. Using lowlevel socket
calls (in contrast to the connection level calls that would have
handled the TLS just fine).

While this seem sto be a huge improvement to the situation I kindly
ask you to do a lot testing on this. Both with SOURCE as well as
PUT clients.
2015-02-10 09:44:11 +00:00
Philipp Schafft
d6908eb024 Fix/Cleanup: Answer SOURCE/PUT requests with a real 200-OK.
We have answered SOURCE/PUT requests with a simple
"HTTP/1.0 200 OK\r\n\r\n" while we should answer with complet
headers. This commit corrects this.

Interoperability:
This will work for two classes of clients:
 * Super dumb ones not checking the response and will just send
   data and hope the socket is still open.
 * Those with a real parser.
 * Shoutcast clients (indepnded code path).
 * All libshout, curl, wget, ... based clients.

This *could* break:
 * Clients that check for the exact returned message. However
   as we start with the same string this should work.
   Only client that check for the string including the End-of-header
   CRLF sequense may break.

Please test careful before release.
2015-02-10 09:12:33 +00:00
Philipp Schafft
9cf6d9313c Sync common/ 2015-02-10 08:46:44 +00:00
Philipp Schafft
91eb78fc3a Feature: Expose TLS status in <listener> tags.
This exposes the TLS status as <tls> tag in the <listener> tag.
The tag contains a bool ("true" or "false"). TLS mode, version and
other parameters are out of the scope of this tag and may be added
as independed tags in later commits.
2015-02-09 12:14:16 +00:00
Philipp Schafft
927ccf5213 Cleanup: corrected comment TAGs 2015-02-09 12:06:29 +00:00
Philipp Schafft
c89a5714fb Cleanup: Converted tag <Listeners> to lowercase.
This converts the <Listeners> tag to lowercase on listclients admin
command. This is to align with stats.xml which already uses lowercase.
See: #2097
2015-02-09 12:03:00 +00:00
Philipp Schafft
765ceabe81 Fix: Detect socket errors on TLS based source connections 2015-02-07 12:21:31 +00:00
Philipp Schafft
7bc7472972 Fix: do keep SSL state when reusing a TLS connection. 2015-02-06 10:25:40 +00:00
Philipp Schafft
a18e2540fb Fix: Allow client=NULL in util_http_build_header()
This fixes a bug in 8941de3273975504aaa00a35d145c3f26c832d70:
When passing NULL as client parameter to util_http_build_header()
there was a segfault before this change.
2015-02-02 01:08:37 +00:00
Philipp Schafft
19162018f4 Fix: Announce RFC 2817 TLS Support if TLS support is enabled.
This announces TLS support if enabled via Upgrade:-header.
Closes: #2159
2015-02-02 01:05:05 +00:00
Philipp Schafft
dbbd22f792 Cleanup: Set Connection:-Header via client->reuse 2015-02-02 00:50:56 +00:00
Philipp Schafft
68248d15b1 Fix: Also check for Connection:-Header 2015-02-02 00:38:14 +00:00
Philipp Schafft
71408e6291 Feature: Allow RFC 2817 style Upgrade command.
This allows the usage of RFC 2817 style upgrade commands.
This is not correctly announced yet.
Can hardly be tested as most clients do not support this.
Will be helpful with TLS support in libshout.
See: #2159, #2152
2015-02-02 00:34:45 +00:00
Philipp Schafft
c806e47a4a Fix: allow Keep-Alive connections on normal error pages 2015-02-01 23:04:54 +00:00
Philipp Schafft
78213fe30a Cleanup: Move client queue node creation into function.
This adds the function create_client_node() taking care of
client queue node creation.
2015-02-01 21:01:01 +00:00
Philipp Schafft
8941de3273 Fix: Added some more HTTP/1.1 headers
This adds to all responses:
 * "Accept-Encoding: identity"
 * "Connection: close"
 * "Allow: GET, SOURCE" or "Allow: GET" (on admin pages)

This is to generate some infrastructure for Icecast to tell futur
source clients what is supported.

"Upgrade: TLS/1.0" should be added later when upgrade support is present.

See: #2152
2015-02-01 11:56:03 +00:00
Marvin Scholz
0dfc7c5b6a Cleanup codestyle
This commit cleanups codestyle a bit, yet there is still some work to be done
2015-01-25 19:57:27 +01:00
Philipp Schafft
9d84ba2036 Feature: Sending <admin> field to yp server
This sends the <admin> field to yp servers. It is thought be useful
to allow reaching the admins more easily in case of any yp problem.

Closes: #2146
2015-01-18 18:47:24 +00:00
Philipp Schafft
319b6d577f Fix: fix memory leak of active and pending ypdata_t
This (hopefully) fixes a memory leak that caused active and
pending ypdata_t objects to be not freed up on server shutdown
or config reload.

To testers: please enable yp submission and restart and SIGHUP
your instance several times with loglevel set to warning or higher.
Each time after shutdown or SIGHUP check your log for one of the
following two warnings:
 * 'active ypdata not freed up'
 * 'pending ypdata not freed up'

Those warnings must not be in the log. If you spot one please report.
2015-01-18 17:51:58 +00:00
Philipp Schafft
cc613d405f Fix: do not release events that are still in the queue 2015-01-18 17:26:07 +00:00
Philipp Schafft
7e4650138e Fix: fixed memory leak on XSPF generation 2015-01-18 17:14:03 +00:00
Philipp Schafft
3b4e3ed0ed Cleanup: more cleanly define blocks for admin command IDs
This adds info to the blocks about their size.
Also added two more blocks:
* for experimental features such as in private branches or
  or feature branches. This is for command IDs that are going to
  be merged with master some day. At merge they need to be changed
  and put into the regular position.
* for private features that are not going to be merged into master.
  e.g. specific features for a very specific user that are not
  useful for general audiance.

This should help keeping stuff sorted and largey reducing the risk
of command ID collissions on merges of branches.
Also this should make the merger's job a little bit more easy as
there are less likely any conflicts on merge if someone else got
a number closeby and those change is within the diff's context lines.
2015-01-13 08:42:02 +00:00
Philipp Schafft
db9b419250 Cleanup: Removed left overs from pre-<role> auth 2015-01-11 15:40:36 +00:00
Philipp Schafft
11d5dffd49 Cleanup: Removed tailing spaces 2015-01-10 18:53:44 +00:00
Philipp Schafft
e9a90f9918 Cleanup: converted tabs into spaces 2015-01-10 01:48:15 +00:00
Philipp Schafft
99d9be1dc5 Cleanup: two minor code style corrections 2015-01-08 23:39:59 +00:00
Philipp Schafft
205eca50ab Fix: Do not shut down fserve engine if not started up
This avoids a endless loop in a spin lock that has not been inited
yet if fserve engine was not started up by the time it was sent to
go down. This happened if icecast couldn't read the config because
the file was corrupted or non-existent.
Closes: #2144
2015-01-08 23:15:13 +00:00
Philipp Schafft
f992da8cfa Fix: Set on_demand on creation of on-demand relay
This sets the on_demand parameter of the source correctly on
creation of a on-demand relay.
Thanks to Marvin Scholz <epirat07@gmail.com>.
Closes: #2054
2015-01-06 17:12:56 +00:00
Philipp Schafft
f39b7d8880 Cleanup: Removed trivial header files for auth backends
All Auth backends had just one prototype in auth_*.h. Those
got merged into auth.h to avoid to have many small files around.
2015-01-06 11:29:07 +00:00
Philipp Schafft
a52e2e1a35 Fix: SECURITY allow global admins to access all mounts 2015-01-05 16:58:43 +00:00
Thomas B. Ruecker
3d8245f71a making sure submodules are sync 2014-12-31 17:45:09 +00:00
Philipp Schafft
490482deaf Fix: SECURITY Corrected methods of anonymous role for htpasswd legacy auth 2014-12-29 09:48:00 +00:00
Philipp Schafft
0f311a318d Fix: Do not segfault if <role type="..."> is unknown 2014-12-28 21:11:52 +00:00
Philipp Schafft
b638d3c939 Fix: Added support to admin/ interface to list <role>s
This adds support to list global and per mount roles on stats.xsl.
This isn't nicest formated but works.
This also adds <source>-like <authentication> with <role>s to
root node.
Closes: #2133
2014-12-26 21:57:50 +00:00
Philipp Schafft
785c32bfc5 Revert "Fix: avoid assignment discards 'const' qualifier warning"
This reverts commit 0dbabcc44c.
Breaks other OpenSSL versions.
2014-12-24 11:36:34 +00:00
Philipp Schafft
0b1af34f0e Prevent various redefined definitions in win32-specific code
From: Erik van Pienbroek <epienbro@fedoraproject.org>
Date: Mon, 22 Dec 2014 18:02:09 +0100
2014-12-24 11:35:56 +00:00
Philipp Schafft
0dbabcc44c Fix: avoid assignment discards 'const' qualifier warning
Untested. Please test.
See #2063
2014-12-24 09:03:26 +00:00
Philipp Schafft
d75d1d6a7a Feature: Allow <resource> to have only one of source and destination
This allows <resource> (former <alias>) to have only one of the
attribues source and destination. In that case other parameters
will be applied to the client but uri is not mapped.

See #2097
2014-12-20 18:48:03 +00:00
Philipp Schafft
7b5bafdf55 Merge branch fix for <metadata> of relays. 2014-12-20 18:07:04 +00:00
Philipp Schafft
7e9e298e33 Fix: avoid segfault by generating <metadata> for relays 2014-12-20 18:06:42 +00:00
Philipp Schafft
857264acdc Fix: memory leak and race condition fix 2014-12-20 16:12:27 +00:00
Philipp Schafft
2a99aa0f0b Fix: memory leak, now also releasing reglist[] members 2014-12-20 15:30:26 +00:00
Philipp Schafft
8702999204 Fix: memory leak now freeing null_device and global source_password 2014-12-20 15:29:53 +00:00
Philipp Schafft
d3bba3638e Fix: Added missing includes 2014-12-20 13:40:44 +00:00
Philipp Schafft
55d429a6c8 Fix: Corrected display of "login" on status page
This corrects the creation of <authenticator> in the status output
and this way fixes the display of login link on status page.
Closes #1939
2014-12-20 09:39:26 +00:00
Philipp Schafft
3d6ea2efdb Merged support for thread-less <role>s 2014-12-19 17:30:37 +00:00
Philipp Schafft
25f6c53929 Feature: immediate mode for <role>s
This allows a <role> represented by a auth_t to run in "immediate"
mode. In this mode no thread is created for this <role>. This is a
major speedup.

Closes #2124
2014-12-19 17:27:54 +00:00
Philipp Schafft
0eb466b76d Feature: Allow mangement of <role>s via admin/ interface.
This allows to manage <role>s via admin interface if the role supports.
Also format of admin/manageauth has been changed:
- <source> was renamed to <role>.
- mount parameter was removed.
- <role> got new parameters: type, name,
  can-adduser, can-deleteuser, can-listuser.
- can-* parameters are bools ("true" or "false"). They should be used
  to show or hide elements on the admin interface.

Ticket #2123 is nearly complet with this, just admin/manageauth.xsl
needs up be updated. Please close the bug in the commit that updates
admin/manageauth.xsl.
See #2123
2014-12-19 16:14:35 +00:00
Philipp Schafft
a990756912 Feature: Also export type="" in stats.xml's <role>s 2014-12-19 11:28:49 +00:00
Philipp Schafft
7093e19523 Feature: Added support to type="static" <role> to list user
This adds support to list the user for a static <role>.
2014-12-19 11:22:36 +00:00
Philipp Schafft
1c550b0c8e Feature: Added support for management-url="" in <role>
This adds setting a URL for manegement of roles to the framework.
If no URl is given in the config file this defaults to internal
(/admin/manageauth.xsl) interface if supported by the backend.
See #2123
2014-12-19 11:16:13 +00:00
Philipp Schafft
fb088de568 Fix: only export name="" on <role> if set 2014-12-19 11:01:32 +00:00
Philipp Schafft
4c429ab01b Feature: Export <role>s on stats.xml
This exports id and name of <role>s on stats.xml output. The <role>s
are in a <authentication> container tag and mimic the format used
by the config file.

See #2123
2014-12-19 10:51:40 +00:00
Philipp Schafft
40bb04b644 Feature: Added a unique ID to each auth_t.
This added a unique ID to each auth_t instance so it can be refered
to e.g. by the web interface for mangement functionallity. Mostly
stolen from connection.[ch].
See #2123
2014-12-19 10:50:52 +00:00
Philipp Schafft
25eec22692 Cleanup: Removed a printf() leftover from debugging 2014-12-19 10:47:07 +00:00
Philipp Schafft
c5bd8ad281 Fix: Always export <metadata> in stats.xml 2014-12-18 10:24:15 +00:00
Philipp Schafft
4a0c399bf3 Added 'lagcay' mode stats.xml.
Add '?omode=legacy' to any URI or <resource ... omode="legacy" />.
Please test.
closes #2097
2014-12-18 09:56:54 +00:00
Philipp Schafft
dc016bc017 Fix: Fixed compiler warnings
This fixes some compiler warnings. The code should be warning free
if gcc with -Wall is used but for the following:
{{{
admin.c: In function 'command_manageauth':
admin.c:790: warning: unused variable 'mountinfo'
}}}
This warning is due <role> migration. See #2123 for more details on
this warning. Please test with care. closes 2063
2014-12-14 19:18:22 +00:00
Philipp Schafft
8dc069f361 Feature: Support command line arguments in <event type="exec">
This adds support to pass additional command line parameters
to called processes. closes #1752
2014-12-14 16:19:32 +00:00
Philipp Schafft
d67f0f5d91 Fix: Send Content-Disposition:-header correctly, closes #1953 2014-12-14 11:01:39 +00:00
Philipp Schafft
c73e214f8f Regression Fix: Correction of old-style <authentication>.
Old-style <authentication> within <mount> didn't work for type="url"
as well as some other parameters due to confusion between "node"
and "child" variable.

Thanks for trilliot for pointing out! Should work now.
closes #2039
2014-12-14 09:27:49 +00:00
Philipp Schafft
8a4c529347 Cleanup: make strcmp() more explicit in _start_logging()
This avoids if(strcmp()) constructs in favor of if(strcmp() == 0)
constructs. This is aligned with coding style and will improve
readability of the code.

Thanks to miksago. closes #2102
2014-12-14 08:19:58 +00:00
Philipp Schafft
28572be2ec Feature: Extract metadata and export them to stats.xml
All metadata is now extracted from Vorbis streams and ICY streams
and exported as new <metadata> tag into admin/stats if specific
mountpoint is requested.

To testers:
 - Please test with Ogg Vorbis streams.
 - Please test with Ogg Vorbis + Theora streams.
 - Please test chained Ogg streams.
 - Please test with ICY streams.

close #2106
2014-12-09 16:08:27 +00:00
Philipp Schafft
795aa278ad Speedup: Don't copy data into event if there are no registrations
If there are no reistrations that are added to an event the event
doesn't need to be emited as nobody cares anyway. We will do this
simple check before we copy data into the event object to avoid
unnecessary calls to strdup() and other allocation functions.
2014-12-08 07:58:17 +00:00
Philipp Schafft
bdcf008b7c Added <event>: Unified handling of events.
<event> has been added and can be used within <kartoffelsalat>
both in <icecast> and <mount>.
<event> takes backend depending <option> child tags.
Currently supported backends:
 - log: send message to error log.
 - exec: executes a program or script.
 - url: delivers the event via HTTP.

within <mount> <on-connect> and <on-disconnect> has been replaced by
<event>. Config parser can on-the-fly convert old tags.
Also <authentication type="url"> within <mount> has been fixed
for those cases with <option name="mount_add" .../> and
<option name="mount_remove" .../> which are now on-the-fly converted
by the parser to corresponding <event> tags.

Please also see TAGs added as per #2098. Some include hints for
documentation updates needed after this change. Those updates
should take place before 2.4.2.
2014-12-08 00:39:57 +00:00
Philipp Schafft
8f706a4c1e Cleanup: Moved config re-read function into right place
Renamed event_config_read() into config_reread_config() and moved
it into cfgfile.c. This allowed to delete event.[ch].
event.[ch] will later be used to implement <event>.
2014-12-07 10:54:34 +00:00
Philipp Schafft
5d9d9fbe48 ACL: added {allow,deny}-all, support bool notation
Added {allow,deny}-all option to ACL parser. Setting this will
set {allow,deny}-{method,admin,web} to *.

Also allow boolean values (insteed of *) for
{allow,deny}-{web,all}.
2014-12-06 20:04:21 +00:00
Philipp Schafft
f7f998e741 renamed <alias> to <resource>.
renamed <alias> to <resource> as it is planned to extent the usage
of this tag. docs and default configs should be updated by those
taking core of them.
2014-12-06 19:47:54 +00:00
Marvin Scholz
fa35f176ab Update submodules 2014-12-05 12:57:02 +01:00
Marvin Scholz
1bf41cfdb6 Epic Git migration commit
Added .gitignore and submodules
Changed paths to match new location of things
2014-12-02 22:50:57 +01:00
Philipp Schafft
93194594f7 better coding style, patch by ePirat. refs #2059
svn path=/icecast/trunk/icecast/; revision=19376
2014-11-30 20:32:30 +00:00
Philipp Schafft
ea71438af3 s/listener/client/; thanks to micheil.
svn path=/icecast/trunk/icecast/; revision=19375
2014-11-30 18:20:09 +00:00
Philipp Schafft
0ade7d3e17 cleanup: make use of const
svn path=/icecast/trunk/icecast/; revision=19373
2014-11-30 18:18:05 +00:00
Philipp Schafft
35723bed54 sock_active() is broken and can not be used
svn path=/icecast/trunk/icecast/; revision=19372
2014-11-30 18:17:10 +00:00
Philipp Schafft
dae5e45a25 that error is nonsense
svn path=/icecast/trunk/icecast/; revision=19371
2014-11-30 18:15:40 +00:00
Philipp Schafft
0eca1bcfe0 cleanup: don't include "httpp/httpp.h" if not needed
svn path=/icecast/trunk/icecast/; revision=19370
2014-11-30 09:32:06 +00:00
Philipp Schafft
8867d177c5 cleanup: converted printf() into ICECAST_LOG_DEBUG() but commented out so they do not spam logs for normal users.
svn path=/icecast/trunk/icecast/; revision=19368
2014-11-29 12:41:19 +00:00
Philipp Schafft
7a27cacf0b updated chroot and setuid/gid support. Thanks to d26264b9 for reporting. close #2096
svn path=/icecast/trunk/icecast/; revision=19365
2014-11-29 10:34:07 +00:00
Philipp Schafft
23a47c8ffc in <listener>:
- Added <role>.
- Converted <Referer> to <referer>.
- Set id="nnn" in addition to <ID>nnn</ID>.
- Added TAGged comments about next steps.

refs #2097

svn path=/icecast/trunk/icecast/; revision=19364
2014-11-29 10:16:36 +00:00
Philipp Schafft
fa9ab8eeea include <string.h>
svn path=/icecast/trunk/icecast/; revision=19361
2014-11-29 08:28:55 +00:00
Philipp Schafft
5cd1a0cb03 ensure vhost is not uninitialized
svn path=/icecast/trunk/icecast/; revision=19360
2014-11-29 08:16:42 +00:00
Philipp Schafft
373befb9cc include <stdio.h> as FILE* is used in the header
svn path=/icecast/trunk/icecast/; revision=19359
2014-11-29 08:15:23 +00:00
Philipp Schafft
a642cac542 Wow. Mega patch!
This patch *replaces* the authentication system completly.

What is new:
 - <authentication> in mount section is now a container object.
 - <authentication> in root and mount section may hold any number of <role>-Tags.
 - <role> tags:
   Those tags define a 'role' and it's ACL rules.
   A role is a instance of an authentication module (see below).
   <role> takes the following options. All but type are optional.
   - authentication related:
     - type: Type of the authentication module (values: anonymous, static, legacy-password, url or htpasswd;
             symbolic constants in auth.h)
     - name: Name for the role. For later matching. (values: any string; default: (none))
     - method: This rule is only active on the given list of HTTP methods.
               (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: *)
   - ACL related:
     - allow-method: Allowed HTTP methods.
       (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: get)
     - deny-method: Rejected HTTP methods.
       (list of enum values: methods as recognized by httpp/ (e.g: get,post); default: *)
     - allow-admin: Allowed admin commands. (list of enum values: admin command; default: buildm3u)
     - deny-admin: Rejected admin commands. (list of enum values: admin command; default: *)
     - allow-web: Allowed web pages. (values: empty or *; default: *)
     - deny-web: Rejected web pages. (values: empty or *; default: (empty))
     - connections-per-user: maximum number of simultaneous connections per role and username.
       This is only active on active sources.  (values: unlimited or number of connections; default: unlimited)
     - connection-duration: maximum time of a connection. This is only active on active sources.
       (values: unlimited or number of secounds; default: unlimited)
   <role> takes <option> child tags. <option> tags contain a name and a value option.
   Meaning of <option> tags is up to the authentication module.
 - <role>s are considered to build a stack. If a role returns with AUTH_NOMATCH the next one will be tried.
 - <role>s are tested in this order: mount specific, default mount specific, global, internal fallback.
   Internal fallback is set to allow web/ access via GET, POST and HEAD (only GET supported by this time)
   and rejects all other requests.
 - New authentication module: anonymous
   This module matches all requests. No options taken.
 - New authentication module: static
   This module matches with a static username and password.
   It takes two <option>s. One with name="username" and one with name="password" to set username and password.
   This replaces old style <*-username> and <*-password> tags.
 - New authentication module: legacy-password
   This module matches with a statich password.
   It takes one <option> with name="password" to set password.
   This replaces old ICE and ICY (shoutcast compat mode) authentication.
 - Parsing <authentication> in <mount> with a type set in a special way to allow 100% backward compatibility.
 - Parsing of <source-password>, <admin-password>, <admin-user>, <relay-password> and <relay-user> in global
   <authentication> for 100% backward compatibility.
 - <alias> is now proccessed very early. This enables them to be used for all kinds of requests.

To Do List & What does not yet work:
 - type="url" auth: mount_add and mount_remove.
   This should be replaced by an unique feature I would call '<event>'.
 - Admin commands manageauth and manageauth.xsl are disabled as they need more review:
   This code needs to be ported to support multiple <role>s per <mount>.
 - url authentication module can not yet return AUTH_NOMATCH.
   This needs to be reviewed and discussed on how to handle this case best way.
 - Default config files needs to be updated to reflect the changes.
   As this is quite some political act it should be done in dicussion with the whole team
   and permission of the release manager.
 - Docs need to be updated to reflect the changes.

How does it work:
 Code has been changed so that authentification is done early for all clients.
 This allows accessing the ACL data (client->acl) from nearly everywhere in the code.

 After accept() and initial client setup the request is parsed. In the next step
 all <alias>es are resolved. After this the client is passed for authentication.
 After authentication it is passed to the corresponding subsystem depending on kind of request.

 All authentication instances have a thread running for doing the authentication.
 This thread works on a queue of clients.

Hints for testers:
 - Test with default config.
 - Test with diffrent authentication modules in <mount>.
 - Test shoutcast compatibility mode.
 - Test with new style <authentication> and any amount of <role> (zero to quite some).
 - Test <alias> lookup on all kinds of objects.
 - Test source level credential login into the admin interface.
 - Test shoucast style meta data updates.
 - Test playlist generation.

Thank you for reading this long commit message. Have fun reading the full patch!

svn path=/icecast/trunk/icecast/; revision=19358
2014-11-28 23:46:08 +00:00
Philipp Schafft
637af17f82 some more changes for ACL framework: exported admin_get_command() and ADMIN_COMMAND_ERROR as well as introduced ADMIN_COMMAND_ANY
svn path=/icecast/trunk/icecast/; revision=19349
2014-11-22 05:42:36 +00:00
Philipp Schafft
09692dd45e expose converting of method names to enum values as httpp_str_to_method()
svn path=/icecast/trunk/httpp/; revision=19348
2014-11-22 04:44:47 +00:00
Philipp Schafft
ec439d10eb Changed ABI a bit: updated httpp_request_type_e-type. To avoid any problems do a complet rebuild of your projects. Thank you.
svn path=/icecast/trunk/httpp/; revision=19347
2014-11-22 04:06:26 +00:00
Philipp Schafft
bdc392beb1 some smaller stuff needed to get new authing stuff done
svn path=/icecast/trunk/icecast/; revision=19346
2014-11-22 03:49:36 +00:00
Philipp Schafft
6cca1c5585 allow symbolc names for bools, public settings and loglevel
svn path=/icecast/trunk/icecast/; revision=19345
2014-11-21 19:52:48 +00:00
Philipp Schafft
0df154f3bf remove client_send_[0-9]{3}() in favor of client_send_error(). Please test
svn path=/icecast/trunk/icecast/; revision=19344
2014-11-21 18:05:17 +00:00
Philipp Schafft
237eb4f770 first part of patch to allow kh like admin stats with listener tags inside
svn path=/icecast/trunk/icecast/; revision=19343
2014-11-21 15:37:50 +00:00
Philipp Schafft
1fe898adb5 allow comments to be within the <http-headers> block, not just at the end
svn path=/icecast/trunk/icecast/; revision=19342
2014-11-21 10:08:16 +00:00
Philipp Schafft
558cff06d9 (sync with my branch) Updated handling of <on-connect> and <on-disconnect> in <mount>, see r19305:r19312, refs #1354, #2089, #2087, #1752
svn path=/icecast/trunk/icecast/; revision=19340
2014-11-21 09:28:29 +00:00
Philipp Schafft
503059f481 (sync with my branch) report system name and print better warnings about <hostname> at start of process
svn path=/icecast/trunk/icecast/; revision=19339
2014-11-20 18:41:42 +00:00
Philipp Schafft
dfd6b74068 (sync with my branch) remove threadpool_size in global config, added warnings for <threadpool> and <no-yp> as well as updated warning for <source-password>
svn path=/icecast/trunk/icecast/; revision=19338
2014-11-20 18:36:57 +00:00
Philipp Schafft
6dca08ee5d (sync with my branch) Support for reloading server config using admin interface. close #2018
svn path=/icecast/trunk/icecast/; revision=19337
2014-11-20 18:34:41 +00:00
Philipp Schafft
5a8d0d1646 (sync with my branch) support vhosting on aliases
svn path=/icecast/trunk/icecast/; revision=19336
2014-11-20 18:32:14 +00:00
ePirat
95e7e42b49 Set PATH_MAX to 4096 if not defined (patch by Svante Signell <svante.signell@gmail.com>)
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767542

svn path=/icecast/trunk/icecast/; revision=19321
2014-11-19 11:30:58 +00:00
ePirat
e7d68fd3b0 Move declarations to begin of block
(patch by Andreas Mieke)

svn path=/icecast/trunk/icecast/; revision=19318
2014-11-18 17:43:34 +00:00
ePirat
42f763bf37 Experimental fix for memory errors when using a lot of headers, see #1885
svn path=/icecast/trunk/icecast/; revision=19316
2014-11-18 10:17:16 +00:00
Philipp Schafft
baee2d0c7f subset of my earlier patch so it can go into 2.4.1: disconnects stdio of <on-[dis]connect> scripts from random filehandles. closes #2087
svn path=/icecast/trunk/icecast/; revision=19313
2014-11-17 19:20:57 +00:00
Philipp Schafft
d06b6b1846 patch to fix regression on header size with large headers introduced by support of <server-id> and <http-headers>. This should ensure we have at least space for 2kB of extra headers. Depending on function and call we may have much more space.
Please test this very carefully.
Some pointers what should be in the tests (NOT complet list):
- request to 'static' web/ and admin/ pages.
- requests to playlist generation.
- requests to streams.
- requests to admin/ manipulation functions.
- test everything with at least 8kB of extra headers, then reduce in 1kB (or 512B) steps.
- see if response is correct OR 500 is returned.
- run under valgrind or similar to see no buffer overflow or similiar will happen.
- take a cookie!

svn path=/icecast/trunk/icecast/; revision=19300
2014-11-10 10:46:55 +00:00
Thomas B. "dm8tbr" Ruecker
298b1ac79a Once more updated string, same Qualys results.
String taken from:
https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29

svn path=/icecast/trunk/icecast/; revision=19295
2014-11-09 10:55:29 +00:00
Thomas B. "dm8tbr" Ruecker
574274d22e Make sure email address is up to date.
svn path=/icecast/trunk/icecast/; revision=19292
2014-11-08 17:13:48 +00:00
Thomas B. "dm8tbr" Ruecker
24b7825adb Applying patch, HTTP PUT requires content-type
In case of SOURCE we are lenient and thus quite some source clients
don't send a proper content-type, especially if they only support mp3.

This was meant to be introduced in 2.4.0 already, sadly we missed it.

All source clients MUST send proper content-type after migrating to 
Icecast HTTP PUT protocol.

closes #2082

svn path=/icecast/trunk/icecast/; revision=19288
2014-11-08 16:23:26 +00:00
Philipp Schafft
06977d788c Fixed regression introduced in r18356 (CVE-2011-4612): client duration time is now correctly logged. PRIu64 MUST NOT be used with log_write_direct() as depending on platform PRIu64 may be using something not supported by __vsnprintf() of log/log.c. close #2081, see r18356
svn path=/icecast/trunk/icecast/; revision=19287
2014-11-08 13:34:45 +00:00
Philipp Schafft
d959c20f11 make use of sizeof() not explicit magic numbers
svn path=/icecast/trunk/icecast/; revision=19286
2014-11-08 12:28:17 +00:00
Philipp Schafft
ab0ac755be fixing some compiler warnings
svn path=/icecast/trunk/net/; revision=19282
2014-11-07 23:14:29 +00:00
Philipp Schafft
9353b5e448 fixing some compiler warnings
svn path=/icecast/trunk/httpp/; revision=19281
2014-11-07 23:14:00 +00:00
Philipp Schafft
fc63b67b87 fixing some compiler warnings
svn path=/icecast/trunk/icecast/; revision=19280
2014-11-07 23:10:43 +00:00
Philipp Schafft
78ca9bd2ba updated some copyright headers
svn path=/icecast/trunk/icecast/; revision=19278
2014-11-07 22:06:06 +00:00
Philipp Schafft
29d9778c09 fix for %z on win*. hope it doesn't breaky anything else.
svn path=/icecast/trunk/icecast/; revision=19277
2014-11-07 20:56:04 +00:00
Philipp Schafft
70f8d14d1c added warnings on empty and default values of <fileserve>, <hostname>, <location>, <admin> and <server-id>
svn path=/icecast/trunk/icecast/; revision=19276
2014-11-07 19:14:28 +00:00
Philipp Schafft
0b7e65c3c9 send errorlog (loglevel WARN) to stderr prior to opening the real logfiles. closes #1886
svn path=/icecast/trunk/icecast/; revision=19271
2014-11-07 11:18:54 +00:00
Philipp Schafft
1d56769648 added support for type="" and status="" in <header> (subelement of <http-headers>).
svn path=/icecast/trunk/icecast/; revision=19270
2014-11-07 10:12:24 +00:00
Philipp Schafft
9597e2eadd Added support for <http-headers> within <mount>. Also support merging of headers (normal mount + default mount). See #1885
svn path=/icecast/trunk/icecast/; revision=19269
2014-11-07 02:55:57 +00:00
Philipp Schafft
aa869033e2 handle empty strings in config file better. Now empty strings are handled in: accesslog, errorlog, logdir, webroot, adminroot and hopefully all kinds of port. Feal free to reopen ticket if there are more that needs to be fixed. closes #1963
svn path=/icecast/trunk/icecast/; revision=19268
2014-11-07 01:40:28 +00:00
Philipp Schafft
df9d738b6e initial patch to allow adding user defined headers, closes #1885
svn path=/icecast/trunk/icecast/; revision=19267
2014-11-07 00:56:02 +00:00
Philipp Schafft
97454060eb coding style and typo correcion
svn path=/icecast/trunk/icecast/; revision=19266
2014-11-06 23:55:58 +00:00
Thomas B. "dm8tbr" Ruecker
859c761cb6 Be more verbose in case of fileserve off.
svn path=/icecast/trunk/icecast/; revision=19265
2014-11-06 12:02:00 +00:00
Thomas B. "dm8tbr" Ruecker
0eff9a91e9 applied patch to update the default ciphers to be more secure (close #2072)
This was taken from: https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/#fnref2 (scroll up 2 lines)

I've tested this successfully against https://www.ssllabs.com/ssltest/ in combination with the patch for #2071. The only OS/Browser combination failing is: IE 6 / XP

svn path=/icecast/trunk/icecast/; revision=19264
2014-11-05 10:09:07 +00:00
Philipp Schafft
a3b50beabd applied patch to disable SSLv3 and SSL compression explicitly (close #2071)
svn path=/icecast/trunk/icecast/; revision=19263
2014-11-03 19:34:10 +00:00
Philipp Schafft
e6ce60e630 rename ICE_LISTEN_QUEUE, ICE_RUNNING and ICE_HALTING so they have a prefix of ICECAST_
svn path=/icecast/trunk/icecast/; revision=19258
2014-10-31 09:00:45 +00:00