View Issue Details

IDProjectCategoryView StatusLast Update
0006100unrealircdpublic2023-03-19 11:30
Reportersyzop Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0.3 
Fixed in Version6.0.7 
Summary0006100: URL within block is fetched even if @if evaluates to false
DescriptionThe modules.default.conf contains:
@if module-loaded("geoip_classic")
set {
        geoip-classic {
                ipv4-database "https://www.unrealircd.org/files/geo/classic/GeoIP.dat" { url-refresh 14d; }
                ipv6-database "https://www.unrealircd.org/files/geo/classic/GeoIPv6.dat" { url-refresh 14d; }
        }
}
@endif

However, the URL is fetched even if geoip_classic is not loaded (eg no loadmodule line or there is a blacklist-module for it).

Fixing this would require adding an extra "stage", so that would not be like an easy fix/change, but it is good to have an issue for it.
TagsNo tags attached.
3rd party modules

Activities

syzop

2023-03-19 11:30

administrator   ~0022788

Did not fix the "there is no loadmodule line for it" but did fix the "there is a blacklist-module item for it" case. I'm happy enough with it so this can be closed.
https://github.com/unrealircd/unrealircd/commit/5c108e0ec3474fea49fb0044f2db9500bacbe95b

commit 5c108e0ec3474fea49fb0044f2db9500bacbe95b (HEAD -> unreal60_dev, origin/unreal60_dev, origin/HEAD)
Author: Bram Matthys <[email protected]>
Date: Sun Mar 19 11:25:37 2023 +0100

    Don't fetch GeoIP.dat upon blacklist-module geoip_classic;
    Reported in https://bugs.unrealircd.org/view.php?id=6100
    
    Actually this only works if you have a:
    blacklist-module geoip_classic;
    in your conf and that conf is read before modules.default.conf
    This is true if you have that blacklist-module line in your
    unrealircd.conf, so should cover most cases.

Issue History

Date Modified Username Field Change
2022-05-11 07:48 syzop New Issue
2022-05-11 07:48 syzop Description Updated
2022-05-11 07:50 syzop Description Updated
2022-05-11 07:50 syzop Assigned To => syzop
2022-05-11 07:50 syzop Status new => acknowledged
2023-03-19 11:30 syzop Status acknowledged => resolved
2023-03-19 11:30 syzop Resolution open => fixed
2023-03-19 11:30 syzop Fixed in Version => 6.0.7
2023-03-19 11:30 syzop Note Added: 0022788