View Issue Details

IDProjectCategoryView StatusLast Update
0006319unrealircdpublic2024-06-30 19:08
ReporterBlackBishop Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version6.1.7 
Summary0006319: "ban user" and "require authentication" is not a mask item
DescriptionTrying to `ban user` seems to crash

ban user {
  mask ~security-group: badpeople;
  reason "you shouldn't be here';
}

Trying in another way

security-group badpeople {
  mask {
x.x.x.x/y;
  };
};
ban user {
  mask {
    security-group {
      badpeople;
    };
  };
  reason "You shouldn't be here!";
};

Results in:
ban::mask specified without a value
ban::mask is missing
TagsNo tags attached.
3rd party modules

Relationships

duplicate of 0006397 resolvedsyzop Documentation for require-authentication says you can use a mask but you can't 
duplicate of 0006159 closedsyzop Update ban blocks to be able to use mask items 

Activities

BlackBishop

2023-07-26 11:17

reporter   ~0022980

The example `Ban all except` in https://www.unrealircd.org/docs/Ban_user_block doesn't work either.
I just can't make ban user work for some reason.

And `mask ~security-group: badpeople;` is a reproducible crash on another platform also. I know the syntax is wrong, but it still shouldn't crash.

syzop

2023-07-26 12:49

administrator   ~0022981

Fixed the crash:
commit 2665cec73bad67acc79232e633c8887352525c97 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD)
Author: Bram Matthys <[email protected]>
Date:   Wed Jul 26 12:44:31 2023 +0200

    Fix crash when ~security-group:securitygroup is used in conf (so old style
    in eg ban user::mask).
    Reported by BlackBishop in https://bugs.unrealircd.org/view.php?id=6319


But you are right, the 'new' syntax / mask item syntax (and thus the example) does not work in "ban user". The code uses the old style. While many other places including "except ban" support the new style (Mask item).
I will leave this bug open until that issue is resolved, I won't have time for this in the next few weeks.

BlackBishop

2023-07-26 13:05

reporter   ~0022982

Thank you!

syzop

2023-09-09 10:54

administrator   ~0023022

Renamed to "ban user is not a mask item" and is now a feature request. Documentation adjusted for now.

syzop

2024-04-07 08:02

administrator   ~0023165

Merged report 0006397 in here: this is now also about "require authentication", which nearly uses the same code.

Both ban user { } and require authentication { } will support a real mask item somewhere in the future. Don't have an exact time or which release.

syzop

2024-06-30 19:08

administrator   ~0023232

Last edited: 2024-06-30 19:08

Done in https://github.com/unrealircd/unrealircd/commit/bc7c69dd201d0bb023d12ab92c3d234da1f742f9 but more testing is required.

commit bc7c69dd201d0bb023d12ab92c3d234da1f742f9 (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD)
Author: Bram Matthys <[email protected]>
Date: Sun Jun 30 19:04:57 2024 +0200

    Make ban user::mask and require authentication::mask a Mask item. Finally.
    As requested in
    https://bugs.unrealircd.org/view.php?id=6159 by PeGaSuS
    https://bugs.unrealircd.org/view.php?id=6319 by BlackBishop
    https://bugs.unrealircd.org/view.php?id=6397 by Valware
    
    The mask item https://www.unrealircd.org/docs/Mask_item
    means you can use all the power of mask items and security groups and
    multiple matching criteria.
    
    This requires a bit more testing as username/hostname are NULL now
    so some code paths may have to be adjusted. The function call to add
    server bans has changed too. And, really need to check that soft bans
    are not broken... because they might be ;D

Issue History

Date Modified Username Field Change
2023-07-26 10:40 BlackBishop New Issue
2023-07-26 11:17 BlackBishop Note Added: 0022980
2023-07-26 12:49 syzop Note Added: 0022981
2023-07-26 12:49 syzop Assigned To => syzop
2023-07-26 12:49 syzop Status new => confirmed
2023-07-26 12:49 syzop Target Version => 6.1.2-rc1
2023-07-26 13:05 BlackBishop Note Added: 0022982
2023-09-09 10:54 syzop Severity minor => feature
2023-09-09 10:54 syzop Target Version 6.1.2-rc1 =>
2023-09-09 10:54 syzop Summary Trying to ban user with security group results in crash => ban user is not a mask item
2023-09-09 10:54 syzop Note Added: 0023022
2023-09-09 10:55 syzop Assigned To syzop =>
2023-09-09 10:55 syzop Status confirmed => acknowledged
2024-04-07 08:01 syzop Summary ban user is not a mask item => "ban user" and "require authentication" is not a mask item
2024-04-07 08:02 syzop Note Added: 0023165
2024-06-30 19:03 syzop Relationship added duplicate of 0006397
2024-06-30 19:03 syzop Relationship added duplicate of 0006159
2024-06-30 19:08 syzop Assigned To => syzop
2024-06-30 19:08 syzop Status acknowledged => resolved
2024-06-30 19:08 syzop Resolution open => fixed
2024-06-30 19:08 syzop Fixed in Version => 6.1.7
2024-06-30 19:08 syzop Note Added: 0023232
2024-06-30 19:08 syzop Note Edited: 0023232