Project

General

Profile

Bug #10911

Bandwidthd iframe not resizing in 2.4.5/2.4.5p1

Added by Steve Yates about 1 month ago. Updated 10 days ago.

Status:
Feedback
Priority:
Low
Category:
bandwidthd
Target version:
-
Start date:
09/17/2020
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.4.5-p1
Affected Architecture:
All

Description

Forum thread from several posters: https://forum.netgate.com/topic/152323/bandwidthd-in-pfsense-2-4-5

Looking at 2.4.4 the iframe tag is rendered as:

<iframe id="bandwidthd" src="/bandwidthd/index.html" scrolling="no" style="overflow: hidden; width: 100%; height: 15882px; max-width: 100%;"></iframe>

On 2.4.5 it is:

<iframe id="bandwidthd" src="/bandwidthd/index.html" scrolling="no" style="overflow:hidden; width: 100%;*height: 10*%; max-width: 100%;"></iframe>

Firefox's scripting Console shows the script error:

Uncaught TypeError: e.indexOf is not a function
    load jQuery
    <anonymous> https://router-building/diag_bandwidthd.php:274

...which is line "$('#bandwidthd').load(function() {" in the HTML.

Side note I suspect isn't related since it was this way on 2.4.4p3, per https://github.com/pfsense/FreeBSD-ports/commit/183cabc59ca0b65368d1a8f6ffe967f80a46a6d2#diff-24986f02c41aa576cbf334c961135ee3 this is at the bottom of the page:

<?php include("foot.inc"); ?>
<script>
$('#bandwidthd').load(function() {
/* Find height of iframe contnet and then add 20px for padding */
$(this).height( $(this).contents().find("body").height() + 20 );
});
</script>

It renders as:

<script type="text/javascript">CsrfMagic.end();</script></body>
*</html>*
<script>
$('#bandwidthd').load(function() {
/* Find height of iframe contnet and then add 20px for padding */
$(this).height( $(this).contents().find("body").height() + 20 );
});
</script>

...with the script after the </html>. Firefox marks this as "stray start tag 'script'" in its View Page Source.

History

#2 Updated by Renato Botelho 10 days ago

  • Status changed from New to Feedback
  • Assignee set to Renato Botelho

PR has been merged. Thanks!

Also available in: Atom PDF