Project

General

Profile

Actions

Bug #10911

closed

Bandwidthd iframe not resizing in 2.4.5/2.4.5p1

Added by Steve Y over 3 years ago. Updated over 3 years ago.

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

0%

Estimated time:
Plus Target Version:
Affected Version:
2.4.5-p1
Affected Plus Version:
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.

Actions #2

Updated by Renato Botelho over 3 years ago

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

PR has been merged. Thanks!

Actions #3

Updated by Max Leighton over 3 years ago

  • Status changed from Feedback to Resolved

Tested pfSense-pkg-bandwidthd-0.7.4_3 in Chrome, Edge, Firefox with no sizing issues. Working as expected. Marking the ticket resolved.

Actions

Also available in: Atom PDF