Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: net/tools/transport_security_state_generator/input_file_parsers.cc

Issue 2941543002: Add a .gitattributes file to force LF line-endings in net/http/*.pins files. (Closed)
Patch Set: Move .gitattributes. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « .gitattributes ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/transport_security_state_generator/input_file_parsers.cc
diff --git a/net/tools/transport_security_state_generator/input_file_parsers.cc b/net/tools/transport_security_state_generator/input_file_parsers.cc
index 4a633080ed00ec5a830196241985c253babdc411..752969aaa24b0b7a3328cd75af7bc6d09306e4c6 100644
--- a/net/tools/transport_security_state_generator/input_file_parsers.cc
+++ b/net/tools/transport_security_state_generator/input_file_parsers.cc
@@ -167,6 +167,12 @@ enum class CertificateParserState {
} // namespace
bool ParseCertificatesFile(base::StringPiece certs_input, Pinsets* pinsets) {
+ if (certs_input.find("\r\n") != base::StringPiece::npos) {
+ LOG(ERROR) << "CRLF line-endings found in the pins file. All files must "
+ "use LF (unix style) line-endings.";
+ return false;
+ }
+
std::string line;
CertificateParserState current_state = CertificateParserState::PRE_NAME;
« no previous file with comments | « .gitattributes ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698