~ubuntu-branches/debian/experimental/apt-cacher-ng/experimental

« back to all changes in this revision

Viewing changes to source/showinfo.cc

  • Committer: Package Import Robot
  • Author(s): Eduard Bloch
  • Date: 2012-08-04 20:50:16 UTC
  • mfrom: (1.6.1) (29.1.28 sid)
  • Revision ID: package-import@ubuntu.com-20120804205016-hwzo9wwcqjpf0zid
Tags: 0.7.7-1
* New upstream releasee
  + pass-through mode for allowed hosts (LP: #647212)
  + possible fixes of file descriptor objects expiration (closes: #677983)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                                "please contact the system administrator.";
72
72
        }
73
73
        tSS buf(1023);
74
 
        buf << "HTTP/1.1 " << (m_sHttpCode ? m_sHttpCode : "200")
75
 
                        << " OK\r\nConnection: close\r\nContent-Type: "
 
74
        buf << "HTTP/1.1 " << (m_sHttpCode ? m_sHttpCode : "200 OK")
 
75
                        << "\r\nConnection: close\r\nContent-Type: "
76
76
                        << (m_sMimeType?m_sMimeType:"text/html")
77
77
                        << "\r\nContent-Length: " << contents.length() << "\r\n\r\n";
78
78
        SendRawData(buf.rptr(), buf.size(), MSG_MORE);
113
113
        for(tStrVecIterConst it=files.begin(); it!=files.end(); it++)
114
114
        {
115
115
                if(it->find_first_of(BADCHARS)!=stmiss  // what the f..., XSS attempt?
116
 
                                || stmiss != it->find("..") )
 
116
                 || rechecks::Match(*it, rechecks::NASTY_PATH))
117
117
                {
118
118
                        contents.clear();
119
119
                        return;
137
137
        if(!bConfirmMode)
138
138
        {
139
139
                StrSubst(contents, "$VISACTION", "visible");
140
 
                StrSubst(contents, "$VISQUESTION", "hidden");
 
140
                StrSubst(contents, "$VISQUESTION", "hidden;height:0px;");
141
141
        }
142
142
        else // just confirm
143
143
        {
144
 
                StrSubst(contents, "$VISACTION", "hidden");
 
144
                StrSubst(contents, "$VISACTION", "hidden;height:0px;");
145
145
                StrSubst(contents, "$VISQUESTION", "visible");
146
146
        }
147
147
}