Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. NodeBB Development
  3. Notice: Breaking change in v4.5.0 (requests to internal IP addresses disallowed)

Notice: Breaking change in v4.5.0 (requests to internal IP addresses disallowed)

Scheduled Pinned Locked Moved NodeBB Development
nodebb
1 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • julianJ This user is from outside of this forum
    julianJ This user is from outside of this forum
    julian
    wrote on last edited by julian@community.nodebb.org
    #1

    We are publishing a notice today to bring to attention an unintentional breaking change that could affect some users of NodeBB.

    v4.5.0 contained an update to src/request.js that calls a DNS resolver to ensure that the destination address is not a reserved IP address (e.g. 192.168..., 127.0..)

    This change was introduced in order to close off any potential for Server-Side Request Forgery for any calls made within the NodeBB codebase.

    In the vast majority of installations, this has no unintended effects. In some installations, custom plugins or themes may call URLs that resolve to an internal address on purpose (e.g. to query an internal database or similar.) In those situations, the call will now fail as of v4.5.0.

    In those situations, you will need to update the plugin to add the domain to the allow list by calling the filter:request.init hook:

    plugin.json

    {
      ...
      "hooks": [
        ...
        { "hook": "filter:request.init", "method": "allowInternalHostname" },
        ...
      ]
      ...
    }
    

    library.js or similar

    const plugin = module.exports;
    
    plugin.allowInternalHostname = async ({ allowed }) => {
      allowed.add('example.org');
      return { allowed };
    });
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups