867 Commits

Author SHA1 Message Date
Storm Dragon
a53fe39f44 Misnamed some files during the opus addition. 2025-04-05 02:11:59 -04:00
Storm Dragon
29832f85d2 Fix a problem with makefile. 2025-04-05 02:07:32 -04:00
Storm Dragon
4cbe796774 Attempt to add opus support. 2025-04-05 02:03:06 -04:00
Storm Dragon
326b491fde Attempt to add opus support. 2025-04-05 02:02:50 -04:00
Justin Maggard
1a9b32ee7a Wrap up version 1.3.3. 2023-05-31 01:25:59 -07:00
Justin Maggard
9bd58553fa upnphttp: Fix chunk length parsing 2023-05-31 00:41:07 -07:00
Robert Högberg
d809ab778f locale: Improve Swedish translation 2023-05-31 00:37:50 -07:00
Justin Maggard
b4dd1e28f9 locale: Improve Dutch translation
I am a native Dutch speaker and attached a patch to improve the Dutch
translations. Especially one is important as it was a Swedish text,
instead of Dutch.

Manuel Bilderbeek
2023-05-31 00:31:08 -07:00
Justin Maggard
c7a1c900ab upnpsoap: Error out earlier on certain SQLi attempts 2023-05-31 00:28:21 -07:00
Stefan Eßer
5df410a53d Do not remove kevent from closed request sockwt.
After a successful transfer pass EV_FLAG_CLOSING to the kevent delete
function since the corresponding socket has been been closed and there
is no kevent request record to delete.

This prevents spurious error messages:

    kqueue.c:210: error: kevent() error 9 on 2391 filter:-1 flags:0x4000
2023-05-31 00:02:12 -07:00
Georgy Kibardin
c5c4d9e169 monitor: Fix directory symlink deletion handling
When a symlink to a direcotry is deleted inotify cannot tell it from a
regular file rendering all its children orphans.
This sometimes leads to an unexpected effect - they may appear later in
a newly created directory when it gets an id used by the deleted symlink.
2023-05-30 23:54:44 -07:00
Justin Maggard
0a6e10e821 Wrap up version 1.3.2 2022-08-29 22:42:54 -07:00
Justin Maggard
f140859351 upnphttp: Improve DNS rebinding attack protection
Detect invalid IP addresses in the Host field and reject as needed.
2022-08-29 22:36:53 -07:00
Justin Maggard
f35304a5d2 build: Fix libexif test 2022-08-29 22:36:53 -07:00
Alex Stanev
6defeaf607 Add Samsung Neo QLED series (2021) support 2022-08-29 22:36:53 -07:00
b'Justin Maggard
d54f5f6bd9 Merge /u/andrensairr/minidlna/ branch master into master
https://sourceforge.net/p/minidlna/git/merge-requests/41/
2022-02-11 16:57:24 +00:00
b'Justin Maggard
b98d1b53ad Merge /u/hzeller/minidlna.fork/ branch master into master
https://sourceforge.net/p/minidlna/git/merge-requests/28/
2022-02-11 16:54:02 +00:00
b'Justin Maggard
abfb21ed22 Merge /u/kolbyjack/minidlna/ branch add-cling-client-detection into master
https://sourceforge.net/p/minidlna/git/merge-requests/34/
2022-02-11 16:51:03 +00:00
Gleb Smirnoff
92820eb1ee monitor_kqueue: plug memory leak from strcpy() on directory delete 2022-02-11 07:41:06 -08:00
lqs
a1c8a1856d add webm/rm/rmvb support 2022-02-11 07:11:28 -08:00
Justin Maggard
cfb775682b build: Add buildroot packaging for static build 2022-02-11 00:37:42 -08:00
Justin Maggard
45a0b5fd56 Wrap up version 1.3.1 2022-02-11 00:31:31 -08:00
Peter Urbanec
2c66335a9b upnpevents: Fix leaked sockets
Commit f9a78d598e48132a8c6cf9ce31b51163b6bd2f67 refactored the code, but
in the process introduced a socket leak. When connect() is called on a
socket set to non-blocking mode, the returned error code is EINPROGRESS.
In that case, the code never initialises the ev structure and the socket
reference is lost. Given enough time (on my network about a day and a half)
this will eventually lead to a non-responsive server because the process
runs out of fds. Netstat will show an excessive number of sockets stuck in
CLOSE_WAIT state forever and ls /proc/<pid>/fd will confirm a lot of open
sockets.

Initialising the ev struct before a call to connect() ensures that the
socket reference is not lost. Verifying with netstat, one can see the
sockets in TIME_WAIT state for a brief period of time and /proc/<pid>/fd
shows a reasonable number of sockets being open.
2022-02-11 00:30:04 -08:00
Vlad Starodubtsev
26ce01f473 upnphttp: fix forked process termination at error 2022-02-11 00:30:04 -08:00
Justin Maggard
3c49d66d82 process: avoid negative number of children
The number_of_children child connections number becomes negative (-1) at
server startup due to signal handlers treatments on minidlna.c init().

Opening the webserver status page with no clients connected the opening
connection shows -1 even if client list show 0 for all in the columns.

When connecting the first client, its own connections column goes to 1
and total goes to 0, and so on always one count behind.

Simply allow: number_of_children-- only if not 0

From SF user negan07
2022-02-11 00:30:04 -08:00
Justin Maggard
5c4895a09b build: support gettext 0.20
support compiling if gettext 0.20 or later is found

AM_GNU_GETTEXT_REQUIRE_VERSION overwrites AM_GNU_GETTEXT_VERSION if
autoreconf supports it, so legacy systems are still supported.

From SF user CvH
2022-02-11 00:30:04 -08:00
Justin Maggard
6e18db1a12 upnphttp: Make the :8200 http page automatically refresh
The ReadyMedia :8200 http page reports scanning progress. Why not make it
automatically refresh?

From SF user gharris999
2022-02-11 00:30:04 -08:00
Piotr Trojanek
814b23ee59 Fix descriptor leak with a corrupted DSD file
Detected with cppcheck.
2022-02-11 00:30:04 -08:00
Justin Maggard
696b2c3e1d tivo: Fix multiple definitions of sqlite3 plugin struct 2022-02-10 23:51:28 -08:00
Justin Maggard
c21208508d upnphttp: Protect against DNS rebinding attacks
Validate HTTP requests to protect against DNS rebinding.
2022-02-10 23:51:28 -08:00
Justin Maggard
8d8d04785b build: Fix configure error on some platforms
Fixes libid3tag and libavformat detection errors.
2022-02-10 23:51:28 -08:00
Justin Maggard
b4e55102af minissdp: Harden SSDP request parsing
Avoids a potential crash from malformed header.
2022-02-10 23:51:28 -08:00
Andrew Polden
6feb4b4c97 Support for FLAC sample size 2021-10-10 13:49:24 +11:00
Andrew Polden
a8325705ef Support other vorbis comments
Some extended and commonly used tag names may store metadata useful to minidlna, so read these where allowance is already made for their storage and use.
2021-10-10 13:49:24 +11:00
Andrew Polden
289a4f39bb Support YEAR vorbis comment
Where the DATE comment is not available, fall back to using YEAR.
2021-10-10 13:49:23 +11:00
Gleb Smirnoff
1d363c209f Use timevals everywhere where it is possible, including API between main
loop and event dispatchers. This simplifies code and eliminates a bug,
when kevent dispatcher is called with 0 timeout.

While here, in the main loop call gettimeofday() right after event
dispatcher returns. Otherwise, we are using outdated "timeofday" in
second part of the loop. I don't know any bugs because of that, but
they are possible.
2021-01-07 11:02:51 -08:00
Gleb Smirnoff
cad8c922f0 Consolidate start/finish of monitor on different platforms into
one API. Monitor is started either before main loop, if scanner
isn't running, or in the main loop once we finished waiting for
the scanner.
2021-01-07 11:02:44 -08:00
Gleb Smirnoff
ee912576b3 Separate platform indepenent code into monitor.c, and move inotify(7)
specific code to monitor_inotify.c.
Both monitor_inotify.c and monitor_kqueue.c provide their functions
for adding and removing watches. Prefix these functions with monitor_.
2021-01-07 10:58:29 -08:00
Justin Maggard
109d63cb11 Wrap up version 1.3.0 2020-11-24 10:53:50 -08:00
Justin Maggard
e31c420e27 locale: Add missing translation string to ru.po 2020-11-24 10:53:50 -08:00
Gleb Smirnoff
36b9136d2b Use newer IP_MULTICAST_IF API
Use newer API for IP_MULTICAST_IF which allows one to specify
interface by index, not by address. Introduced in Linux 3.5, it IMHO should
be available on all systems that declare struct ip_mreqn.

This fixes operation failure when a system has multiple interfaces
with same address, but only on of them is desired. Example:

> grep interface /usr/local/etc/minidlna.conf
network_interface=igb0
> ifconfig igb0
igb0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 0c:c4:7a:xx:xx:xx
        inet 10.1.10.3 netmask 0xffffff00 broadcast 10.1.10.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
> ifconfig ng0
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1454
        inet 10.1.10.3 --> 10.1.10.2 netmask 0xffffffff

In such configuration, ng0 would be chosen before this fix.
2020-11-24 10:53:50 -08:00
Justin Maggard
256d271201 clients: Add webOS TV 3.5 FLAC support
webOS TV 3.5 needs a sepcial FLAC mime type.
2020-11-18 14:45:11 -08:00
Justin Maggard
42646c99e0 upnpsoap: Add "path" SortCriteria support
Useful for manual sort overrides, to sort by filename.
2020-11-18 14:45:11 -08:00
Andreas Boeckler
13efe02e2d activated systemd-foreground-option on OS X for launchd 2020-11-18 14:45:11 -08:00
Justin Maggard
a668daa9da upnphttp: Downgrade "HTTP Connection closed unexpectedly"
Lots of clients trigger this during normal operation.
2020-11-18 14:45:11 -08:00
Vlad Starodubtsev
204a0ded8d monitor: fix setting max_user_watches.
reset file position after read.
2020-11-18 14:45:11 -08:00
Justin Maggard
347aafa6d7 Fix some build warnings when building with musl 2020-11-18 14:45:11 -08:00
Justin Maggard
379b66ca95 Use $USER instead of $LOGNAME for default friendly_name
Using $USER in the friendly name will display which user minidlna is
running as on the clients, which can be helpful for detecting problems.
Using $LOGNAME on the other hand will display "root" as the username if
minidlna was started using the init script, regardless of which user
minidlna is currently running as.

Originally added by Benoît Knecht <benoit.knecht@fsfe.org>
2020-11-18 14:45:11 -08:00
Fabrice Fontaine
b5e75ff7d1 fix build with gcc 10
Define setjmp_buffer as static to avoid the following build failure with
gcc 10 (which defaults to -fno-common):

/home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: image_utils.o:(.bss+0x0): multiple definition of `setjmp_buffer'; metadata.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

Fixes:
 - http://autobuild.buildroot.org/results/8754bb4f7d749f999d5f8ddfec587470ceec4476

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-11-18 14:45:11 -08:00
Justin Maggard
9f1677825c Fix some warnings from newer compilers 2020-11-18 14:45:11 -08:00