Debian Codegraph @

contrib/epel-patches/nagios-0010-remove-information-leak.patch

raw
1 diff -up ./cgi/extinfo.c.remove_3rdparty_links ./cgi/extinfo.c
2 --- ./cgi/extinfo.c.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000
3 +++ ./cgi/extinfo.c 2019-08-29 18:17:32.321544245 +0000
4 @@ -557,27 +557,6 @@ void document_header(int use_stylesheet)
5 printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, NAGFUNCS_CSS);
6 }
7
8 - if (display_type == DISPLAY_HOST_INFO)
9 - vidurl = "https://www.youtube.com/embed/n3QEAf-MxY4";
10 - else if(display_type == DISPLAY_SERVICE_INFO)
11 - vidurl = "https://www.youtube.com/embed/f_knwQOS6FI";
12 -
13 - if (enable_page_tour == TRUE && vidurl) {
14 - printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, JQUERY_JS);
15 - printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, NAGFUNCS_JS);
16 - printf("<script type='text/javascript'>\n");
17 - printf("var vbox, vBoxId='extinfo%d', vboxText = "
18 - "'<a href=https://www.nagios.com/tours target=_blank>"
19 - "Click here to watch the entire Nagios Core 4 Tour!</a>';\n",
20 - display_type);
21 - printf("$(document).ready(function() {\n"
22 - "var user = '%s';\nvBoxId += ';' + user;\n",
23 - current_authdata.username);
24 - printf("vbox = new vidbox({pos:'lr',vidurl:'%s',text:vboxText,"
25 - "vidid:vBoxId});\n", vidurl);
26 - printf("});\n</script>\n");
27 - }
28 -
29 printf("</head>\n");
30
31 printf("<body CLASS='extinfo'>\n");
32 diff -up ./cgi/status.c.remove_3rdparty_links ./cgi/status.c
33 --- ./cgi/status.c.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000
34 +++ ./cgi/status.c 2019-08-29 18:17:32.322544264 +0000
35 @@ -555,31 +555,8 @@ void document_header(int use_stylesheet)
36 /* JS function to append content to elements on page */
37 printf("<script type='text/javascript'>\n");
38 if (enable_page_tour == TRUE) {
39 - printf("var vbox, vBoxId='status%d%d', vboxText = "
40 - "'<a href=https://www.nagios.com/tours target=_blank>"
41 - "Click here to watch the entire Nagios Core 4 Tour!</a>';\n",
42 - display_type, group_style_type);
43 printf("$(document).ready(function() {\n"
44 "$('#top_page_numbers').append($('#bottom_page_numbers').html() );\n");
45 - if (display_type == DISPLAY_HOSTS)
46 - vidurl = "https://www.youtube.com/embed/ahDIJcbSEFM";
47 - else if(display_type == DISPLAY_SERVICEGROUPS) {
48 - if (group_style_type == STYLE_HOST_DETAIL)
49 - vidurl = "https://www.youtube.com/embed/nNiRr0hDZag";
50 - else if (group_style_type == STYLE_OVERVIEW)
51 - vidurl = "https://www.youtube.com/embed/MyvgTKLyQhA";
52 - } else {
53 - if (group_style_type == STYLE_OVERVIEW)
54 - vidurl = "https://www.youtube.com/embed/jUDrjgEDb2A";
55 - else if (group_style_type == STYLE_HOST_DETAIL)
56 - vidurl = "https://www.youtube.com/embed/nNiRr0hDZag";
57 - }
58 - if (vidurl) {
59 - printf("var user = '%s';\nvBoxId += ';' + user;",
60 - current_authdata.username);
61 - printf("vbox = new vidbox({pos:'lr',vidurl:'%s',text:vboxText,"
62 - "vidid:vBoxId});\n", vidurl);
63 - }
64 printf("});\n");
65 }
66 printf("function set_limit(url) { \nthis.location = url+'&limit='+$('#limit').val();\n }\n");
67 diff -up ./cgi/tac.c.remove_3rdparty_links ./cgi/tac.c
68 --- ./cgi/tac.c.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000
69 +++ ./cgi/tac.c 2019-08-29 18:17:32.323544284 +0000
70 @@ -308,17 +308,7 @@ void document_header(int use_stylesheet)
71
72 if (enable_page_tour == TRUE) {
73 printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, NAGFUNCS_JS);
74 -
75 - printf("<script type='text/javascript'>\nvar vbox, vBoxId='tac', "
76 - "vboxText = '<a href=https://www.nagios.com/tours target=_blank>"
77 - "Click here to watch the entire Nagios Core 4 Tour!</a>';\n");
78 - printf("$(document).ready(function() {\n"
79 - "var user = '%s';\nvBoxId += ';' + user;", current_authdata.username);
80 - printf("vbox = new vidbox({pos:'lr',"
81 - "vidurl:'https://www.youtube.com/embed/l20YRDhbOfA',text:vboxText,"
82 - "vidid:vBoxId});");
83 - printf("\n});\n</script>\n");
84 - }
85 + }
86
87
88
89 diff -up ./html/main.php.remove_3rdparty_links ./html/main.php
90 --- ./html/main.php.remove_3rdparty_links 2019-08-20 15:29:34.000000000 +0000
91 +++ ./html/main.php 2019-08-29 18:20:16.216716704 +0000
92 @@ -19,20 +19,7 @@ $this_year = '2019';
93
94 <script type='text/javascript'>
95 var cookie;
96 - <?php if ($cfg["enable_page_tour"]) { ?>
97 - var vbox;
98 - var vBoxId = "main";
99 - var vboxText = "<a href=https://www.nagios.com/tours target=_blank> " +
100 - "Click here to watch the entire Nagios Core 4 Tour!</a>";
101 - <?php } ?>
102 $(document).ready(function() {
103 - var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER']); ?>";
104 -
105 - <?php if ($cfg["enable_page_tour"]) { ?>
106 - vBoxId += ";" + user;
107 - vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/2hVBAet-XpY',
108 - text:vboxText,vidid:vBoxId});
109 - <?php } ?>
110 loadRemoteFeed( // Our top banner splash.
111 '#splashbox0-contents', 'corebanner', 1,
112 '', processBannerItem, ''
113 @@ -59,7 +46,6 @@ $this_year = '2019';
114 crossDomain: true,
115 success: function(d, status, jqXHR) {
116 // We should have Internet access, set the playlist HTML.
117 - initializePlaylist();
118
119 var text = ''; // Start with empty text by default.
120
121 @@ -94,19 +80,6 @@ $this_year = '2019';
122 : '';
123 }
124
125 -
126 - // Set our playlist HTML when we know we have Internet access.
127 - var playlistInitialized = false;
128 - function initializePlaylist() {
129 - if (!playlistInitialized) {
130 - playlistInitialized = true;
131 - $('#splashbox3')
132 - .addClass('splashbox3-full')
133 - .removeClass('splashbox3-empty')
134 - .html('<iframe width="100%" height="100%" src="//www.youtube.com/embed/videoseries?list=PLN-ryIrpC_mCUW1DFwZpxpAk00i60lSkE&iv_load_policy=3&rel=0" frameborder="0" allowfullscreen></iframe>');
135 - }
136 - }
137 -
138 // Get the daemon status JSON.
139 function getCoreStatus() {
140 setCoreStatusHTML('passiveonly', 'Checking process status...');
141 diff -up ./html/map.php.remove_3rdparty_links ./html/map.php
142 --- ./html/map.php.remove_3rdparty_links 2019-08-29 18:17:32.324544303 +0000
143 +++ ./html/map.php 2019-08-29 18:20:48.488341376 +0000
144 @@ -71,22 +71,6 @@
145 <script type="text/javascript" src="js/jquery-3.7.1.min.js"></script>
146 <script type="text/javascript" src="js/nag_funcs.js"></script>
147
148 - <?php if ($cfg["enable_page_tour"]) { ?>
149 - <script type='text/javascript'>
150 - var vbox;
151 - var vBoxId = "map";
152 - var vboxText = "<a href=https://www.nagios.com/tours target=_blank>" +
153 - "Click here to watch the entire Nagios Core 4 Tour!</a>";
154 - $(document).ready(function() {
155 - var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER']); ?>";
156 -
157 - vBoxId += ";" + user;
158 - vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/leaRdb3BElI',
159 - text:vboxText,vidid:vBoxId});
160 - });
161 - </script>
162 - <?php } ?>
163 -
164 </head>
165 <body ng-controller="mapCtrl" <?php echo $img; ?>>
166 <div id="image-cache" style="display: none;"></div>