Commit Graph

24 Commits

Author SHA1 Message Date
Carl Eugen Hoyos 8f0bd1d9ba lavf/httpauth: Do case-insensitive http header checks.
Tested by trac user NTAuthority.
Fixes ticket #5786.
2016-09-03 13:56:40 +02:00
Andrey Utkin fdb3283872 avformat/httpauth: Add space after commas in HTTP/RTSP auth header
This fixes access to Grandstream cameras, which return 401 to ffmpeg
otherwise.
VLC sends Authorization: header with spaces between parameters, and it
is known to work with Grandstream devices and broad range of other HTTP
and RTSP servers, so author considers switching to such behaviour safe.
Just for record - RFC 2617 (HTTP Auth) does not specify the need in
spaces, so this is not a bug of FFmpeg.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-07 00:10:16 +02:00
Michael Niedermayer ab5d46df16 avformat/httpauth: add comment about "" and algorithm
Suggested-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 17:04:57 +01:00
Carl Eugen Hoyos 3ba056017f Fix http authentication.
Add parenthesis around "MD5" in the request string as required by
RFC 2069.

Fixes ticket #3417.

Reported and tested by Haarman
Analyzed-by: Eugen-Andrei Gavriloaie
2014-02-27 16:56:30 +01:00
Reimar Döffinger 88d55b827d Remove incorrect use of ctype.h functions.
As far as I can tell the code should not change behaviour
depending on locale in any of these places.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-03-03 21:44:10 +01:00
Michael Niedermayer f391e405df Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21':
  Use the new aes/md5/sha/tree allocation functions
  avutil: Add functions for allocating opaque contexts for algorithms
  svq3: fix pointer type warning
  svq3: replace unsafe pointer casting with intreadwrite macros
  parseutils-test: various cleanups

Conflicts:
	doc/APIchanges
	libavcodec/svq3.c
	libavutil/parseutils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:52:34 +02:00
Martin Storsjö e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Michael Niedermayer 7333798c85 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libopenjpeg: support YUV and deep RGB pixel formats
  Fix typo in v410 decoder.
  vf_yadif: unset cur_buf on the input link.
  vf_overlay: ensure the overlay frame does not get leaked.
  vf_overlay: prevent premature freeing of cur_buf
  Support urlencoded http authentication credentials
  rtmp: Return an error when the client bandwidth is incorrect
  rtmp: Return proper error code in handle_server_bw
  rtmp: Return proper error code in handle_client_bw
  rtmp: Return proper error codes in handle_chunk_size
  lavr: x86: add missing vzeroupper in ff_mix_1_to_2_fltp_flt()
  vp8: Replace x*155/100 by x*101581>>16.
  vp3: don't use calls to inline asm in yasm code.
  x86/dsputil: put inline asm under HAVE_INLINE_ASM.
  dsputil_mmx: fix incorrect assembly code
  rtmp: Factorize the code by adding handle_invoke
  rtmp: Factorize the code by adding handle_chunk_size
  rtmp: Factorize the code by adding handle_ping
  rtmp: Factorize the code by adding handle_client_bw
  rtmp: Factorize the code by adding handle_server_bw

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/x86/dsputil_mmx.c
	libavfilter/vf_overlay.c
	libavformat/Makefile
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-26 21:37:15 +02:00
Antti Seppälä 5423e908c9 Support urlencoded http authentication credentials
It should be possible to specify usernames in http requests containing
urlencoded characters. This patch adds support for decoding the auth
strings.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-26 00:18:32 +03:00
Michael Niedermayer 6968a7d193 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  doc/general: update supported devices table.
  doc/general: add missing @tab to codecs table.
  h264: Fix invalid interlaced/progressive MB combinations for direct mode prediction.
  avconv: reindent
  avconv: link '-passlogfile' option to libx264 'stats' AVOption.
  libx264: add 'stats' private option for setting 2pass stats filename.
  libx264: fix help text for slice-max-size option.
  http: Clear the auth state on redirects
  http: Retry auth if it failed due to being stale
  rtsp: Resend new keepalive commands if they used stale auth
  rtsp: Retry authentication if failed due to being stale
  httpauth: Parse the stale field in digest auth
  dxva2_vc1: pass the overlap flag to the decoder
  dxva2_vc1: fix decoding of BI frames
  FATE: add shorthand to wavpack test
  dfa: convert to bytestream2 API
  anm decoder: move buffer allocation from decode_init() to decode_frame()
  h264: improve parsing of broken AVC SPS

Conflicts:
	ffmpeg.c
	libavcodec/anm.c
	libavcodec/dfa.c
	libavcodec/h264.c
	libavcodec/h264_direct.c
	libavcodec/h264_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-14 02:10:11 +01:00
Martin Storsjö 8a3360d18a httpauth: Parse the stale field in digest auth
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-13 10:36:17 +02:00
Michael Niedermayer c065255bba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacenc: Fix LONG_START windowing.
  aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
  avplay: use the correct array size for stride.
  lavc: extend doxy for avcodec_alloc_context3().
  APIchanges: mention avcodec_alloc_context()/2/3
  avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.
  aacsbr: ARM NEON optimised sbrdsp functions
  aacsbr: align some arrays
  aacsbr: move some simdable loops to function pointers
  cosmetics: Remove extra newlines at EOF

Conflicts:
	libavcodec/utils.c
	libavfilter/formats.c
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-29 00:34:59 +01:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Michael Niedermayer 29582df797 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vble: remove vble_error_close
  VBLE Decoder
  tta: use an integer instead of a pointer to iterate output samples
  shorten: do not modify samples pointer when interleaving
  mpc7: only support stereo input.
  dpcm: do not try to decode empty packets
  dpcm: remove unneeded buf_size==0 check.
  twinvq: add SSE/AVX optimized sum/difference stereo interleaving
  vqf/twinvq: pass vqf COMM chunk info in extradata
  vqf: do not set bits_per_coded_sample for TwinVQ.
  twinvq: check for allocation failure in init_mdct_win()
  swscale: add padding to conversion buffer.
  rtpdec: Simplify finalize_packet
  http: Handle proxy authentication
  http: Print an error message for Authorization Required, too
  AVOptions: don't return an invalid option when option list is empty
  AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio)

Conflicts:
	libavcodec/avcodec.h
	libavcodec/tta.c
	libavcodec/vble.c
	libavcodec/version.h
	libavutil/opt.c
	libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-12 02:50:25 +01:00
Martin Storsjö b911518d1c http: Handle proxy authentication
Tested with both Basic and Digest authentication, and tested with
both proxy authentication and authentication for the requested
resource at the same time.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-11 14:07:57 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Martin Storsjö f9c399c4fd Make parse_key_value from httpauth a common lavf internal function
Originally committed as revision 24832 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 14:49:53 +00:00
Howard Chu 784824a68c Use AV_BASE64_SIZE() macro
Originally committed as revision 23462 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-04 01:15:41 +00:00
Martin Storsjö 3c80491daa httpauth: Fix the length passed to av_strlcat
Since the buffer always was large enough, this bug didn't have any
effect in practice.

Originally committed as revision 23447 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-03 20:31:29 +00:00
Martin Storsjö 576fb48e6d Make ff_random_get_seed public, rename to av_get_random_seed, export the header
Keep an old ff_ named function for binary compatibility until the
next major bump.

Originally committed as revision 23254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-23 08:53:40 +00:00
Ronald S. Bultje ff273ddae7 Fix buffer size; should hold 2 32-bit integers in hex = 16 chars + terminating
zero, so should be 17 bytes, not 9.

Originally committed as revision 22786 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-02 22:08:57 +00:00
Martin Storsjö 60f198a774 Remove a redundant null pointer check
Originally committed as revision 22679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 21:53:42 +00:00
Martin Storsjö 855e7732c6 Add support for http digest authentication
Originally committed as revision 22667 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-25 13:58:26 +00:00
Martin Storsjö 9405f733d9 Split out http authentication handling into a separate file
This prepares for adding support for more authentication methods

Originally committed as revision 22660 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-24 22:32:05 +00:00