Issues (1191)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

templates/footer.php (7 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
		<!-- jQuery, Tether, Bootstrap JS and own-->
2
		<script
3
			  src="https://code.jquery.com/jquery-3.1.1.min.js"
4
			  integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
5
			  crossorigin="anonymous"></script>
6
	    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 205 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
7
	    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 212 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
8
	    <script src="<?php echo $baseUrl;?>js/jQueryEmoji.js"></script>
9
	    <script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.js" integrity="sha256-1odJPEl+KoMUaA1T7QNMGSSU/r5LCKCRC6SL8P0r2gY=" crossorigin="anonymous"></script>
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 196 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
10
11
		<script>
12
		//lightbox
13
		$(document).on('click', '[data-toggle="lightbox"]', function(event) {
14
		    event.preventDefault();
15
		    $(this).ekkoLightbox();
16
		});
17
18
		//Verify Captcha
19
		function verifyAccount(key, deviceUid)
20
		{
21
			var solution = "";
22
			for (i=0; i<9; i++) {
23
				var box = $("#box_"+i);
24
				if (box.is(':checked') == true)
25
				{
26
					if (solution != "" || solution == "0")
27
					{
28
						solution += "-" + i;
29
					}
30
					else 
31
					{
32
						solution = i;
33
					}
34
35
				}
36
			}
37
			console.log(solution);
38
			$.ajax({
39
			  type: "POST",
40
			  url: "<?php echo $baseUrl;?>vote-ajax.php?solution=" + solution + "&key="+key,
41
			  data: {"deviceUid" : deviceUid},
42
			  success: function(result){
43
				  	var response = JSON.parse(result);
44
45
			  		if(response["success"])
46
			  		{
47
			  			location.reload();
48
			  		}
49
			  		else
50
			  		{
51
			  			alert('Fail! Please try again.');
52
			  			location.reload();
53
			  		}
54
55
			  }
56
			});
57
		}
58
59
			//BackButton
60
			function goBack()
61
			{
62
				window.history.back();
63
			}
64
		<?php if(isset($includeEmojiAndAjax)){ ?>
65
66
			function vote(postId, vote, obj)
67
			{
68
				$.ajax({
69
					url: '<?php echo $baseUrl;?>vote-ajax.php?postId=' + postId + '&vote=' + vote,
70
					dataType: 'json',
71
					async: true,
72
					success: function(json)
73
					{
74
						if(json)
75
						{
76
							obj.style.color = '#5682a3';
77
78
							if(vote == 'up')
79
							{
80
								obj.parentNode.getElementsByTagName('span')[0].innerHTML = ++obj.parentNode.getElementsByTagName('span')[0].innerHTML;
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 126 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
81
							}
82
83
							if(vote == 'down')
84
							{
85
								obj.parentNode.getElementsByTagName('span')[0].innerHTML = --obj.parentNode.getElementsByTagName('span')[0].innerHTML;
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 126 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
86
							}
87
						}
88
					}
89
				});
90
			}
91
92
			$(document).ready(function()
93
			{
94
				<?php if(isset($errorMsg)) { ?>
95
				//Error Msg
96
				if('<?php echo $errorMsg;?>' != '')
97
				{
98
					alert('<?php echo $errorMsg;?>');
99
				}
100
				<?php } ?>
101
102
				//Transform UTF-8 Emoji to img
103
				$('.jodel > content').Emoji();
104
105
				$('a').on('click', function(){
106
				    $('a').removeClass('selected');
107
				    $(this).addClass('selected');
108
				});
109
110
				function scrollToAnchor(aid){
111
				    var aTag = $("article[id='"+ aid +"']");
112
				    $('html,body').animate({scrollTop: aTag.offset().top-90},'slow');
113
				}
114
115
				//Ajax load more Posts
116
				var win = $(window);
117
				var lastPostId = "<?php echo $view->lastPostId; ?>";
118
				var view = "<?php echo $view->view; ?>";
119
				var hashtag = "<?php echo $view->hashtag; ?>";
120
				var old_lastPostId = "";
121
				var isreadyAgain = true;
122
123
				function getMorePostsByClick()
124
				{
125
					alert(lastPostId);
126
				}
127
128
				function getMorePosts(lastPostId, view, hashtag, old_lastPostId)
129
				{
130
					$.ajax({
131
						url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURIComponent(hashtag),
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 141 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
132
						dataType: 'html',
133
						async: false,
134
						success: function(html) {
135
							var div = document.createElement('div');
136
							div.innerHTML = html;
137
							var elements = div.childNodes;
138
							old_lastPostId = lastPostId;
139
							lastPostId = elements[3].textContent;
140
							lastPostId = lastPostId.replace(/\s+/g, '');
141
142
							if(lastPostId == old_lastPostId)
143
							{
144
								$('#loading').hide();
145
							}
146
							else
147
							{
148
								$('#posts').append(elements[1].innerHTML);
149
							}
150
						}
151
					});
152
153
					$('.jodel > content').Emoji();
154
155
					return {"lastPostId":lastPostId, "old_lastPostId":old_lastPostId};
156
				}
157
158
				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
159
160
				if(window.location.hash)
161
				{
162
					var hash = window.location.hash.slice(1);
163
164
					if(!$("article[id='"+ hash +"']").length)
165
					{
166
						for (var i = 5; i >= 0; i--)
167
						{
168
							if(!$("article[id='"+ hash +"']").length)
169
							{
170
								var result = getMorePosts(lastPostId, view, hashtag, old_lastPostId);
171
								old_lastPostId = result['old_lastPostId'];
172
								lastPostId = result['lastPostId'];
173
							}
174
							
175
						}
176
						scrollToAnchor(hash);
177
178
					}						
179
				}
180
181
				// Each time the user scrolls
182
				win.scroll(function()
183
				{
184
					// End of the document reached?
185
					if ($(window).scrollTop() + $(window).height() > $(document).height() - 100 && isreadyAgain)
186
					{
187
						isreadyAgain = false;
188
						var result = getMorePosts(lastPostId, view, hashtag, old_lastPostId);
189
						old_lastPostId = result['old_lastPostId'];
190
						lastPostId = result['lastPostId'];
191
						isreadyAgain = true;
192
					}
193
				});
194
			<?php } ?>
195
			});	
196
197
		<?php } ?>
198
		</script>
199
200
		<?php  
201
			if(is_file(realpath(__DIR__ . '/..') . '/piwik-script.html'))
202
			{
203
			    include(realpath(__DIR__ . '/..') . '/piwik-script.html');
204
			}
205
		?>
206
207
	</body>
208
</html>
209
0 ignored issues
show
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
210