Skip to content

Commit

Permalink
[Server] Make sure to sanitize username in the HTTP bridge.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 29, 2020
1 parent ca6d3b9 commit 7de9a03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/XrdXrootd/XrdXrootdTransit.cc
Expand Up @@ -39,6 +39,7 @@
#include "Xrd/XrdBuffer.hh"
#include "Xrd/XrdLink.hh"
#include "XrdOuc/XrdOucErrInfo.hh"
#include "XrdOuc/XrdOucUtils.hh"
#include "XrdSys/XrdSysAtomics.hh"
#include "XrdXrootd/XrdXrootdStats.hh"
#include "XrdXrootd/XrdXrootdTrace.hh"
Expand Down Expand Up @@ -267,6 +268,7 @@ void XrdXrootdTransit::Init(XrdXrootd::Bridge::Result *respP, // Private
if (n >= int(sizeof(uname))) n = sizeof(uname)-1;
strncpy(uname, nameP, sizeof(uname)-1);
uname[n] = 0;
XrdOucUtils::Sanitize(uname);
linkP->setID(uname, pID);

// Indicate that this brige supports asynchronous responses
Expand Down

0 comments on commit 7de9a03

Please sign in to comment.