mmainstreet /
jodel-web
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
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
|
|||
| 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
|
|||
| 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
|
|||
| 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
|
|||
| 81 | } |
||
| 82 | |||
| 83 | if(vote == 'down') |
||
| 84 | { |
||
| 85 | obj.parentNode.getElementsByTagName('span')[0].innerHTML = --obj.parentNode.getElementsByTagName('span')[0].innerHTML; |
||
|
0 ignored issues
–
show
|
|||
| 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
|
|||
| 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
|
|||
| 210 |
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.