Compare commits

...

666 Commits
2.621 ... 2.651

Author SHA1 Message Date
Jamie Cameron
1c9d57f5dd Safe mode in the custom commands module just allows execution of commands
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-28 17:17:21 -07:00
Jamie Cameron
4ffa02d636 New version bump 2026-06-28 15:39:34 -07:00
Ilia Ross
57ad5fa535 Update labels
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-28 23:02:39 +02:00
Ilia Ross
a3f5ea3381 Update changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-28 02:40:46 +02:00
Ilia Ross
2579cf54d9 Fix output 2026-06-27 23:45:31 +02:00
Ilia Ross
fa06c02be5 Update changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
https://forum.virtualmin.com/t/cant-create-letsencrypt-cert-with-webmin-2-650/137484/14?u=ilia
2026-06-27 23:26:28 +02:00
Ilia Ross
d02f0b6cb5 Fix Let's Encrypt Certbot PEM path parsing
ⓘ Prevent Webmin from swallowing Certbot's key-path output when extracting PEM paths, while preserving IPv6 cert-name support and adding regression coverage.
2026-06-27 22:59:21 +02:00
Ilia Ross
81d44f8491 Fix live activation of Linux bond interfaces
ⓘ Create and configure missing bond devices with ip link, attach partner interfaces before assigning addresses, avoid legacy module auto-creation when ip is available, and add regression coverage.

Ref.: https://github.com/webmin/webmin/pull/2777
2026-06-27 18:16:38 +02:00
Ilia Ross
6135c01d57 Update changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-26 23:30:00 +02:00
Jamie Cameron
5aa69015f6 New version bump
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-25 16:08:32 -07:00
Ilia Ross
061a4ae0d3 Update changelog for 2.650
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-25 00:56:03 +02:00
Jamie Cameron
031a8b8261 Merge pull request #2775 from webmin/dev/fix-miniserv-restart-loop
Fix to recover from a stale PID file whose PID was reused
2026-06-25 08:23:26 +12:00
Ilia Ross
18296d3a55 Fix to simply skip stale PID file check
https://github.com/webmin/webmin/pull/2775#issuecomment-4792905755
2026-06-24 22:13:14 +02:00
Ilia Ross
18bf94af6a Fix possible startup loop with stale PID file after PID reuse
This PR fixes an issue where, after an unclean exit, Webmin can leave `miniserv.pid` behind.

If the kernel later reuses that PID for an unrelated process, the startup guard only checked that the PID was alive and refused to start with “Webmin is already running”.

With systemd restart handling, this can leave Webmin permanently down until the PID file is manually removed.

This change verifies that the live PID actually belongs to `miniserv.pl` running the same config before treating it as an active Webmin instance.

On Linux, it reads `/proc/<pid>/cmdline`, checks the miniserv script, and compares the config file by inode so symlinked paths still match and Usermin is correctly distinguished.

If the PID is confirmed unrelated, the stale PID file is removed and startup continues. If the process cannot be inspected, the previous conservative behavior is preserved.

Also hardens PID-file parsing with chomp and numeric validation, and adds tests for unrelated PID reuse, matching config, symlinked config, different miniserv config, and unreadable command-line fallback.
2026-06-24 17:37:02 +02:00
Jamie Cameron
d2f9e339f2 Merge pull request #2774 from webmin/dev/miniserv-harden-ws-rw
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix to harden WebSocket backend writes
2026-06-24 17:35:52 +12:00
Ilia Ross
1a2046b1e3 Fix to harden WebSocket backend writes
This PR ensure proxied WebSocket backend writes complete the full buffer for both TLS and plain TCP connections.

Fail backend handshakes cleanly if writes cannot be completed, preventing truncated headers or frames from corrupting linked WebSocket tunnels.

Originally hinted by this code review: d1d1bad4ae (r189931785)
2026-06-24 01:14:32 +02:00
Ilia Ross
db8e34e528 Fix to read SSH key from real home path
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Display Webmin-managed SSH public keys from the configured real home directory for automatic home accounts, matching the save path and avoiding accidental blank key fields.
2026-06-24 00:54:26 +02:00
Ilia Ross
6a1200bc03 Fix to pass request with header if required 2026-06-24 00:30:06 +02:00
Ilia Ross
c94ddc5ec8 Fix to delete selected unit files safely
ⓘ Make system unit deletion operate on the selected unit file, preserve vendor deletion policy, and reject invalid/stale delete targets before any stop or disable side effects.

https://github.com/webmin/webmin/actions/runs/28058126464/job/83065504870
2026-06-24 00:09:43 +02:00
Ilia Ross
0290ec16a5 Fix to make packaged unit edits opt-in
ⓘ Default packaged unit files to read-only, keep drop-ins as the safe override path, hide boot controls for protected base units, and reject [Install] sections in drop-in overrides.
2026-06-23 23:24:44 +02:00
Ilia Ross
41b476c87a Fix to gate packaged unit deletion behind config
ⓘ Add a disabled-by-default module option for deleting packaged systemd unit files, while keeping local unit deletion allowed and enforcing the policy in both UI and backend paths.
2026-06-23 23:24:43 +02:00
Jamie Cameron
7a68b1b994 Merge pull request #2771 from webmin/dev/useradmin-edit-ssh-keys
Add editable SSH public keys for existing Unix users
2026-06-23 14:15:13 -07:00
Ilia Ross
0dbb5d2f89 Fix to share ifupdown parser with network detection
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-23 15:00:32 +02:00
Ilia Ross
27dcd2db4a Fix to validate SSH public keys without root privileges 2026-06-23 12:41:58 +02:00
Jamie Cameron
147e53e5db Merge pull request #2769 from webmin/dev/add-deb-dhcpcd-support-1607
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add dhcpcd network backend for Debian and Raspberry Pi OS
2026-06-22 21:21:33 -07:00
Jamie Cameron
a970bce5a5 Merge pull request #2760 from webmin/systemd
Add Systemd Services and Units module
2026-06-22 21:11:22 -07:00
Jamie Cameron
d1d1bad4ae Merge pull request #2772 from webmin/dev/miniserv-proxy-websockets
Add support to proxy linked-server WebSockets
2026-06-22 21:06:11 -07:00
Ilia Ross
7878ef466f Fix to expire abandoned linked websocket routes
ⓘ Use the existing scheduled websocket cleanup path for linked-server ws-link routes and expire unopened temporary routes after five minutes.

This limits how long credential-bearing proxy routes can remain in `miniserv.conf` while leaving active and normal websocket cleanup behavior unchanged.
2026-06-23 02:24:17 +02:00
Ilia Ross
14c8d9b61e Fix to clean up consumed linked websocket routes
ⓘ Remove single-use ws-link routes when backend setup fails or after the backend handshake is consumed, with final loop cleanup kept as a fallback.

This prevents failed linked websocket retries from leaving temporary credential-bearing routes in `miniserv.conf`.
2026-06-23 01:30:29 +02:00
Ilia Ross
fa09b191b9 Fix to avoid storing browser sessions for xterm websockets
ⓘ Only store `backend_session` for xterm websocket routes when there is no real browser session and a one-time backend key is needed. Normal xterm sessions continue using the browser session directly.
2026-06-23 01:12:44 +02:00
Ilia Ross
c72d232e2f Fix to restrict Basic auth for websocket routes
ⓘ Require websocket routes to opt in with allow_basic_ws before Basic auth is accepted in session mode. Mark linked ws-link routes and no-cookie backend-session routes as allowed, while leaving normal session-backed routes unmarked.
2026-06-23 01:09:43 +02:00
Ilia Ross
6091f08e37 Fix comment 2026-06-22 23:01:58 +02:00
Ilia Ross
d42a6dc725 Fix parent-prefixed linked websocket rewrites
ⓘ Correct linked-server WebSocket proxy registration for parent-prefixed URLs, rebuild backend Host/Origin from the child server, and prevent duplicate rewrites from invalidating tokens.
2026-06-22 23:01:46 +02:00
Ilia Ross
fac6b478b5 Fix to drain pending SSL data in websocket proxy
ⓘ Check OpenSSL's pending buffer before `select()` in the websocket forwarding loop so TLS-backed linked websocket streams do not stall during bursty backend output.
2026-06-22 21:47:16 +02:00
Ilia Ross
a0b67db65b Fix to simplify Miniserv config lock handling
ⓘ Remove the obsolete eval around `flock` in the `miniserv` config lock helper and report lock, write, and close failures explicitly.
2026-06-22 20:41:02 +02:00
Ilia Ross
26311baab9 Fix to use Webmin config locking for ws-link cleanup
ⓘ Make linked websocket teardown use the same `miniserv.conf.lock` convention as `link.cgi`, release the lock safely on cleanup errors
2026-06-22 20:34:00 +02:00
Ilia Ross
7ba1a39271 Fix parent route cleanup work 2026-06-22 20:02:56 +02:00
Ilia Ross
45ca170c20 Add support to proxy linked-server WebSockets
This PR adds general WebSocket proxying for linked Webmin servers, allowing modules such as `xterm` to work when opened through `servers/link.cgi`.

As requested in https://github.com/webmin/webmin/issues/1866.
2026-06-22 16:19:33 +02:00
Ilia Ross
4064f0675c Fix noisy warning
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-22 12:52:32 +02:00
Ilia Ross
886352c6e8 Fix changelog
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-22 02:23:29 +02:00
Ilia Ross
f2fe6c930f Fix to change systemd ACL helper calls
https://github.com/webmin/webmin/pull/2760#discussion_r3449183293
2026-06-22 02:14:10 +02:00
Ilia Ross
762e400156 Add editable SSH public keys for existing Unix users
This PR adds SSH public key management to the Users and Groups edit flow for existing Unix users.

Webmin stores its managed key with a readable marker in `authorized_keys`, validates submitted public keys, preserves unrelated keys, supports rename/update/remove flows, and performs user `.ssh` file operations as the target Unix user.

https://github.com/webmin/webmin/issues/1827
2026-06-22 01:34:40 +02:00
Ilia Ross
f5bf2be07b Add Apache process limit directive help 2026-06-21 23:25:15 +02:00
Ilia Ross
57d650cf9f Add help files for new Apache options
https://github.com/webmin/webmin/issues/1821
2026-06-21 23:03:19 +02:00
Ilia Ross
859169bbae Update changelog 2026-06-21 23:02:34 +02:00
Ilia Ross
3f48d37e7a Add Apache 2.4 MPM process limit directives
Expose missing prefork, worker, and event MPM tuning directives under Apache Processes and Limits, including MaxRequestWorkers, ServerLimit, ThreadLimit, ThreadsPerChild, and spare-thread controls.

https://github.com/webmin/webmin/issues/1821
2026-06-21 22:52:13 +02:00
Ilia Ross
d3be11911e Add to accept CPU fan speed sensor labels
Allow dashboard CPU fan detection to recognize lm-sensors labels like “cpu fan speed” while leaving non-CPU fan labels ignored.

https://github.com/webmin/webmin/issues/1737
2026-06-21 21:11:58 +02:00
Ilia Ross
65f5beeb11 Add hardware RAID passthrough devices config
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Add an opt-in SMART module config option for manually listing hardware RAID passthrough devices, expose configured physical disks to smartctl, and document the option.

https://github.com/webmin/webmin/issues/1704
2026-06-21 19:47:19 +02:00
Ilia Ross
8ba6a02122 Merge branch 'master' into dev/add-deb-dhcpcd-support-1607 2026-06-21 00:00:06 +02:00
Ilia Ross
74fd072551 Fix to drop unnecessary parens 2026-06-20 20:23:36 +02:00
Ilia Ross
b75a95dd42 Fix missing space after if 2026-06-20 20:22:08 +02:00
Jamie Cameron
8c631bceeb Merge pull request #2770 from webmin/dev/net-module-fixes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Fix network module edge cases
2026-06-20 08:59:53 -07:00
Ilia Ross
0cf6654fd9 Fix Postfix localhost destination after hostname domain change
- When the system hostname domain changes, update `localhost.<old-domain>` in Postfix `mydestination` to `localhost.<new-domain>`.

- This sits alongside the existing hostname/FQDN updates for Postfix destinations.

Previous behavior:

`save_dns.cgi` only updated Postfix `mydestination` entries that exactly matched:

- the old short hostname, like `host`
- the old FQDN, like `host.old-domain.test`

It did **not** update:

- `localhost.old-domain.test`

So if you changed:

```text
host.old-domain.test
```

to:

```text
host.new-domain.test
```

Postfix could become:

```text
mydestination = host.new-domain.test, host, localhost.old-domain.test
```

After this hunk, it also updates that localhost domain entry:

```text
localhost.old-domain.test
```

to:

```text
localhost.new-domain.test
```
2026-06-20 15:33:22 +02:00
Ilia Ross
c08468ec48 Fix network config spacing preservation
- Preserve existing spacing and inline comments when rewriting `/etc/nsswitch.conf` `hosts:` lines.

- Preserve indentation, comment prefix, inline comments, and field separators when rewriting `/etc/hosts` rows.

- Add tests for the `nsswitch.conf` spacing/comment behavior.
2026-06-20 15:27:28 +02:00
Ilia Ross
cb4a322042 Fix active virtual interface handling
ⓘ Treat Linux active virtual interfaces as secondary IP addresses instead of independent links, fixing alias parsing, hiding invalid status controls, rejecting down-state creation, and removing existing aliases with ip addr del when needed.

Reproduce path:

Example repro before this fix:

1. Go to **Network Configuration → Network Interfaces → Active Now**.
2. Click **Add a new interface**.
3. Enter:

```text
Name: enp0s5:1
IPv4 address: 10.211.55.21
Netmask: 255.255.255.0
Status: Down
```

4. Click **Create**.

Before the fix, Webmin could still create the alias or handle it inconsistently, because `enp0s5:1` is not a real link that can be “down”. It is just an extra IP address on `enp0s5`.

Expected after the fix:

- The UI should not offer `Status` for active virtual aliases.
- If someone submits `up=0` manually anyway, Webmin rejects it with:
  `Virtual interfaces cannot be created with down status`
- If an existing active virtual alias is saved as down through lower-level code, Webmin removes the IP using something like:

```bash
ip addr del 10.211.55.21/24 dev enp0s5
```
2026-06-20 15:23:09 +02:00
Ilia Ross
f2782073ce Fix to remove factored-out virtual alias changes 2026-06-20 15:09:31 +02:00
Ilia Ross
090aed60df Fix to remove unrelated network formatting cleanups 2026-06-20 14:44:51 +02:00
Ilia Ross
b53ca5b618 Add API helper for dependent form field state
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ API is ui_form_field_state_javascript
2026-06-20 03:29:29 +02:00
Ilia Ross
7ebe3f7dfa Add dhcpcd network backend for Debian and Raspberry Pi OS
This PR adds dhcpcd backend support for Debian and Raspberry Pi OS network configuration. It detects dhcpcd only as a final fallback after Netplan, NetworkManager, and ifupdown, preventing Webmin from incorrectly falling back to `/etc/network/interfaces` on dhcpcd-managed systems.

The new backend reads and writes `/etc/dhcpcd.conf`, including DHCP and static IPv4/IPv6 configuration, gateways, static routes, DNS servers, search domains, MTU, and virtual IPv4 aliases. It also supports implicit DHCP-managed interfaces for default dhcpcd setups with no explicit interface blocks, and handles `allowinterfaces` / `denyinterfaces` behavior.

This PR also fixes apply/delete flows for dhcpcd-managed interfaces and virtual aliases, avoids rewriting generated `/etc/resolv.conf`, preserves spacing/comments in touched hosts and nsswitch files, and tightens Active Now handling so virtual aliases are treated as IP addresses rather than independent links.

https://github.com/webmin/webmin/issues/1607
2026-06-20 01:57:50 +02:00
Jamie Cameron
fc546e1e65 Fix key field in new slave zones
https://github.com/webmin/webmin/issues/2767
2026-06-19 15:42:13 -07:00
Jamie Cameron
29c14acf98 Merge pull request #2749 from webmin/dev/tmp-dir-auto
Fix Webmin temp directory setup in Advanced Options
2026-06-19 12:52:18 -07:00
Jamie Cameron
ea02aeb04a Merge pull request #2768 from webmin/dev/miniserv-ipv6-cidr-1570
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix IPv6 CIDR access control matching
2026-06-19 10:04:04 -07:00
Jamie Cameron
d306a63744 Merge pull request #2766 from bob7123/fix-sni-callback-all-contexts
Register SNI callback on all SSL contexts, not just the default
2026-06-19 09:59:07 -07:00
Ilia Ross
a9c6fe724a Fix IPv6 CIDR access control matching
This PR fixes Webmin IP access control handling for IPv6 CIDR prefixes that are not divisible by 8, such as `/29` as mentioned in this https://github.com/webmin/webmin/issues/1570 ticket.

Before Webmin validation rejected non-byte-aligned IPv6 network sizes, and the runtime matcher compared IPv6 networks only by whole bytes. This meant valid IPv6 CIDR prefixes could not be used safely in access control rules.

Changes:
- Allow IPv6 access-control prefixes from `/0` through `/128`, without requiring divisibility by 8.
- Add bit-accurate IPv6 prefix matching for ACL checks.
- Apply the same matching behavior in both `miniserv.pl` and `webmin/webmin-lib.pl`.
- Fix IPv6 canonicalization for `::` and trailing `::` forms used by the matcher.
- Add regression tests for `/0`, `/29`, `/32`, `/63`, `/64`, `/127`, and `/128`.
2026-06-19 14:50:24 +02:00
Ilia Ross
7fd89fb350 Fix to clarify Postfix virtual alias map labels
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ The Postfix module’s “Virtual Domains” page actually manages `virtual_alias_maps`, not `virtual_mailbox_domains`.

This updates the UI labels, help text, ACL wording, and log message to call the feature "Virtual Alias Maps", reducing confusion without changing behavior.

https://github.com/webmin/webmin/issues/1541
2026-06-19 11:41:08 +02:00
Ilia Ross
ccd2b13942 Fix to enforce private basename for Webmin temp dirs
ⓘ Adds hidden `tempdirname` support and normalizes custom temp paths so Webmin always uses a private final directory like `.webmin`, while keeping the existing permission checks.
2026-06-18 20:48:47 +02:00
bob7123
74bd78ae35 Fix indentation inside foreach loop per review 2026-06-18 08:23:45 +00:00
Ilia Ross
74fd0ca12d Fix XML-RPC CGI execution under miniserv
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Allow xmlrpc.cgi to run when invoked through Webmin's internal CGI do() path while preserving require-safe helper tests, and add regression coverage for CGI header emission.

https://github.com/webmin/webmin/pull/2763#issuecomment-4726296870
2026-06-17 15:06:18 +02:00
Jamie Cameron
8157ff60d2 Merge pull request #2732 from swelljoe/ui-lib-tests-and-quote-escapes
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add some ui-lib tests and fix quote escapes
2026-06-16 22:29:23 -07:00
Jamie Cameron
104b353476 Merge pull request #2763 from webmin/xmlrpc-strict-etc
xmlrpc.cgi strict, warnings, critic, tests, and security audit
2026-06-16 22:13:59 -07:00
Jamie Cameron
bd051635fb Merge branch 'master' of github.com:webmin/webmin
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-16 13:16:46 -07:00
bob7123
8574c70d6b Register SNI callback on all SSL contexts, not just the default
setup_ssl_contexts() registers CTX_set_tlsext_servername_callback only
on the default (*) context. Per-IP contexts from ipcert entries do not
get the callback. When a client connects to a dedicated IP, the per-IP
context is used directly, the SNI callback never fires, and the wrong
certificate is served regardless of the requested hostname.

Fix: register the same SNI callback on every context in %ssl_contexts.
The callback function is unchanged. Clients without SNI still receive
the per-IP certificate. Clients with SNI get the correct certificate
matched by hostname.

Related: https://github.com/virtualmin/virtualmin-gpl/pull/1229

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-16 16:18:12 +00:00
Ilia Ross
845f4a40e4 Fix not to print last extra line
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-16 13:24:37 +02:00
Joe Cooper
b97756b9fb Escape every < 2026-06-15 22:49:27 -05:00
Ilia Ross
8cca3a117f Fix IP address support for Webmin Let’s Encrypt certificates
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
ⓘ Support IPv4/IPv6 identifiers in Webmin Let’s Encrypt requests, add days/months renewal scheduling, and enforce safe automatic renewal defaults for short-lived IP certificates.

a56748a3fc (r188893457)
2026-06-16 03:15:02 +02:00
Ilia Ross
e580dcdd40 Fix to add missing changelog entry
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
[no-build]
2026-06-16 00:56:42 +02:00
Ilia Ross
f4b121c059 Update changelog for 2.650 2026-06-16 00:47:03 +02:00
Joe Cooper
25fea8f568 Fix incorrect ui_select callers 2026-06-15 16:38:34 -05:00
Joe Cooper
69548c4bb8 Escape in ui_select, too 2026-06-15 16:35:42 -05:00
Joe Cooper
29f35302ae Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-15 14:58:47 -04:00
Ilia Ross
baad7081d3 Merge pull request #2765 from webmin/pr/2764
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Fix issues in PR #2764
2026-06-15 16:03:50 +02:00
Ilia Ross
7105021e80 Merge pull request #2764 from DandelionSprout/patch-1
Hotfixes for Norwegian translations.
2026-06-15 16:03:35 +02:00
Ilia Ross
30fb29a300 Fix bugs in translations 2026-06-15 15:51:18 +02:00
Ilia Ross
a1c88df428 Fix to explicitly allow only string 0 or 1 2026-06-15 14:35:24 +02:00
Ilia Ross
cbebe22a14 Update comment 2026-06-15 14:15:52 +02:00
Imre Eilertsen
5f72e2e97e Update no 2026-06-15 13:50:04 +02:00
Ilia Ross
9fb08dd8f0 Fix to rename function name for clarity
3c77f7e3a6
2026-06-15 13:49:44 +02:00
Imre Eilertsen
13a1021661 Update no 2026-06-15 13:48:13 +02:00
Imre Eilertsen
4add8b2e0f Update no 2026-06-15 13:46:03 +02:00
Imre Eilertsen
7884e5f413 Update no 2026-06-15 13:43:45 +02:00
Imre Eilertsen
2187f96d21 Update no 2026-06-15 13:40:56 +02:00
Imre Eilertsen
899c8e270e Update no 2026-06-15 13:39:32 +02:00
Imre Eilertsen
3d26bc80b7 Update no 2026-06-15 13:34:28 +02:00
Imre Eilertsen
841c3e0442 Update no 2026-06-15 13:32:24 +02:00
Ilia Ross
5577c1d50f Add comments for clarity 2026-06-15 13:31:25 +02:00
Imre Eilertsen
e62ee2bb4d Update no 2026-06-15 13:30:56 +02:00
Imre Eilertsen
2007354f27 Update no 2026-06-15 13:24:46 +02:00
Imre Eilertsen
bf397eac7b Update no 2026-06-15 13:23:03 +02:00
Imre Eilertsen
3325cc717e Update no 2026-06-15 13:21:47 +02:00
Imre Eilertsen
305b228c0e Update config.info.no 2026-06-15 13:19:06 +02:00
Joe Cooper
7ca3819d2b xmlrpc.cgi strict, warnings, critic, tests, and security audit 2026-06-15 01:16:09 -05:00
Ilia Ross
162a103c45 Merge branch 'master' into systemd 2026-06-14 23:42:05 +02:00
Ilia Ross
605e575908 Fix to escape select label 2026-06-14 23:37:30 +02:00
Jamie Cameron
1445cd7641 Check permission to delete home dirs in batch operations 2026-06-14 13:29:54 -07:00
Ilia Ross
5b0b6fbf1f Add nftables module to the core too
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-14 17:51:30 +02:00
Ilia Ross
de57c42f4a Fix to update nested group module access in parent order
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
2026-06-14 16:14:21 +02:00
Ilia Ross
ce998ac478 Add module access helpers 2026-06-14 16:00:41 +02:00
Ilia Ross
f65554cec1 Fix to drop breaks 2026-06-14 14:20:21 +02:00
Ilia Ross
8953add81e Fix it to properly retire and exclude nftables for now
ⓘ Move "custom" and "postgresql" into the core Webmin package and add Debian/RPM package metadata so upgrades retire the old standalone module packages cleanly.
2026-06-14 14:06:18 +02:00
Ilia Ross
630de14410 Add custom nftables postgresql modules
https://forum.virtualmin.com/t/custom-commands-module-has-gone/137403/65?u=ilia
2026-06-14 12:46:43 +02:00
Jamie Cameron
804591f892 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-13 18:51:30 -07:00
Jamie Cameron
a56748a3fc Add support for IP-based lets encrypt certs, with version 5.3 of certbot 2026-06-13 18:49:12 -07:00
Jamie Cameron
854b8e8c2b Merge pull request #2759 from mckaygerhard/master-alpine-mysql-mariadb
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Improve alpine mysql/mariadb default support
2026-06-13 15:38:45 -07:00
Jamie Cameron
b0fbe87592 Merge pull request #2762 from webmin/dev/fix-systemd-unit
Don't fork. systemd prefers one process.
2026-06-13 15:33:41 -07:00
Joe Cooper
bf722a658d Ah, I guess keep 5 minute TimeoutStopSec 2026-06-13 15:59:45 -05:00
Joe Cooper
02bdfc20db Type simple for compat with old systems 2026-06-13 15:43:24 -05:00
Joe Cooper
7d6af20741 Don't need ExecStop if systemd is managing process directly 2026-06-13 15:42:53 -05:00
Герхард PICCORO Lenz McKAY
ebbbf7cecb Update CHANGELOG for software module on Alpine Linux
* Update CHANGELOG for software pointing that alpine linux mysql package is supported for sure since  v 3.16
2026-06-13 10:20:44 -04:00
Joe Cooper
da12554998 Don't fork. systemd prefers one process. 2026-06-13 05:34:03 -05:00
Jamie Cameron
84943943fc Merge pull request #2761 from webmin/dev/init-simplify
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Fix init module
2026-06-12 22:07:38 -07:00
Ilia Ross
8dd06e3c34 Add ability to hide services table if dedicated module is avail 2026-06-13 00:52:47 +02:00
Ilia Ross
8f8199a4bf Fix to simplify and show only systemd services 2026-06-13 00:14:08 +02:00
Ilia Ross
53c3ee1c5d Fix to show only related config options for current boot system 2026-06-12 23:59:36 +02:00
Ilia Ross
d94000afbd Add Systemd Services and Units module
This PR adds a standalone Systemd Services and Units module for managing systemd units across system and user scopes.

The module keeps systemd-specific behavior separate from the legacy Bootup and Shutdown module and is implemented as standalone `strict`/`warnings` Perl code rather than depending on its existing init helpers. Those helpers intentionally smooth over multiple init systems, while this module keeps systemd-specific file handling, user-manager behavior, ACL checks, and control operations explicit, scoped, and easier to audit.

It includes:

- Tabbed views for services, timers, sockets, paths, targets, storage, resources, devices, and user units
- Guided creation and editing for common unit types, with contextual fields, validation, and help
- User-scoped unit management with linger support and safe handling of home-directory unit files
- Runtime actions for start, stop, restart, enable, disable, status, logs, properties, dependencies, and system-unit mask/unmask
- Drop-in override inventory plus create, edit, and delete flows
- Manual unit-file editing with daemon reload reminders and actions
- Configurable module behavior, visible tabs, display options, and post-create navigation
- Comprehensive ACL controls for system/user scopes, actions, manual edits, drop-ins, linger, reload, backup, and user filters
- Safe Webmin user support through a scoped safe ACL preset
- Virtualmin integration for granting domain owners access to their own systemd user units
- Tests for unit generation, safety checks, ACL behavior, user-unit handling, backup coverage, and Perl::Critic compatibility

A companion Virtualmin PR adds template integration so domain owners can be granted scoped access to their own systemd user units when this module is installed.
2026-06-12 20:55:28 +02:00
itamarperdomo
ed5bc3e4b6 Improve alpine mysql/mariadb default support
* The MySQL module in Alpine it lacks default values. This change
uses the necessary values ​​for the module to function.
* These values ​​work for any version of Alpine Linux from 3.8
to Edge, since MariaDB is and always has been the default package.
* The tools server package was included in the package instalation
* Missing changelog entries were included
2026-06-11 11:50:56 -04:00
Ilia Ross
2024a48acf Fix job name
Some checks failed
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-10 20:11:24 +02:00
Jamie Cameron
db38923b20 Merge pull request #2753 from webmin/dev/add-alpine-initial-support
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add minimal Alpine Linux compatibility
2026-06-08 21:17:38 -07:00
Ilia Ross
0d4c65ec04 Fix to create custom temp dirs after validation 2026-06-08 18:53:57 +02:00
Ilia Ross
3215c0d0a3 Fix to rename OpenRC init template
ⓘ Rename webmin-gentoo-init to webmin-openrc-init and update setup/distribution references to use the generic OpenRC template name.
2026-06-08 12:24:28 +02:00
Ilia Ross
c11d67d989 Add support for alternate module descriptions
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-07 16:26:37 +02:00
Ilia Ross
6457a1d7d1 Fix missing install commands for Xterm.js
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-07 00:21:44 +02:00
Ilia Ross
91c9f6b4ce Update Xterm.js to fix Control-C on iPadOS/Safari terminals
The issue is a known xterm.js/iPadOS Safari hardware-keyboard bug where Ctrl+C may be reported like Enter/newline instead of terminal interrupt input; it has been fixed upstream in xterm.js.

https://github.com/xtermjs/xterm.js/issues/5721
2026-06-07 00:12:58 +02:00
Ilia Ross
ad06644617 Add minimal Alpine Linux compatibility
This PR adds baseline Alpine Linux support in Webmin with OS detection, APK package and update backend, OpenRC boot integration, ifupdown-style networking support and DHCPD defaults.

https://github.com/webmin/webmin/issues/2353
2026-06-06 23:11:25 +02:00
Ilia Ross
d788bbe9c2 Fix to add a placeholder to tempdir field 2026-06-06 22:49:37 +02:00
Ilia Ross
9577737aeb Fix to harden Webmin temp directory validation
https://github.com/webmin/webmin/pull/2749#discussion_r3368028469
2026-06-06 22:40:52 +02:00
Jamie Cameron
ee50fa41cd Merge pull request #2752 from webmin/dev/fix-broken-renewals
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Fix LE renewal to schedule by elapsed interval
2026-06-06 08:37:54 -07:00
Ilia Ross
80497c60b9 Update comment 2026-06-06 12:59:44 +02:00
Ilia Ross
6026a20424 Fix LE renewal to schedule by elapsed interval
The Webmin SSL LE renewal setting is labeled as "Months between automatic renewal", but it was previously saved as a calendar-style cron month expression like `*/N`.

That is not the same as an elapsed renewal interval. Webmin’s cron matcher evaluates month schedules against calendar month numbers, so values like `*/5`, `*/12`, or values above `12` do not reliably mean “renew every N months”. This could cause uneven or dangerously late renewal timing.

This changes the renewal job to use Webmin cron’s elapsed `interval` support instead of calendar-month matching.

- Saves automatic renewal as `renew * 30 * 24 * 60 * 60` seconds.
- Clears the cron time fields so the scheduler uses the interval path only.
- Keeps `months => '*/N'` so the SSL UI can continue to display the saved renewal value.
- Resets the renewal timer only after a newly issued certificate.
- Preserves the existing renewal timer for settings-only saves.
- Migrates existing month-based Let's Encrypt renewal jobs during postinstall.
2026-06-06 00:22:19 +02:00
Ilia Ross
501bddabc8 Fix to make temp dir perms message translatable 2026-06-05 22:13:48 +02:00
Ilia Ross
e434d0b138 Fix to use a variable for default perms 2026-06-05 22:06:49 +02:00
Ilia Ross
42a5838d9e Fix not to expect option saved in config
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-04 22:35:42 +02:00
Ilia Ross
e10b9eeb40 Fix to treat Dovecot add_config as a single file 2026-06-04 22:29:47 +02:00
Ilia Ross
1e5f3dbb83 Fix to create extra config file on save
https://github.com/virtualmin/virtualmin-gpl/issues/324#issuecomment-4619300683
2026-06-04 22:28:27 +02:00
Ilia Ross
e8a3d9d21b Fix to handle missing user input better
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
https://github.com/webmin/webmin/issues/2750
2026-06-04 11:36:41 +02:00
Jamie Cameron
4e6204f774 Merge branch 'master' of github.com:webmin/webmin 2026-06-03 22:33:55 -07:00
Jamie Cameron
95197bb0af Respect option to add new configs to a different file
https://github.com/virtualmin/virtualmin-gpl/issues/324
2026-06-03 22:33:47 -07:00
Ilia Ross
80da8d1915 Fix Webmin temp directory setup in Advanced Options
This fixes saving a custom Webmin temp directory from Webmin Configuration → Advanced Options.

Previously, setting a path like /var/webmin/tmp failed if the directory did not already exist. Users had to create it manually, and it was easy to end up with a bad parent directory such as /var/webmin with 0700, which made the saved temp path unusable.

This change makes Webmin handle the safe parts automatically:

- Creates missing temp directories and parents as 0755

- Validates existing parent directories are traversable by group/other

- Requires the final Webmin temp directory to be root-owned with mode 0755

- Allows shared temp dirs like /var/tmp when root-owned and 1777

- Shows a clear error when existing permissions must be fixed manually
2026-06-04 01:44:32 +02:00
Ilia Ross
f7b8ef379f Fix terminal mode handling
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
ⓘ Avoid forcing xterm shell PTYs into IO::Stty raw/noecho mode, which can leave interactive shells with broken echo, line editing, and control-key behavior. Keep the existing stty logic for other PTY callers, but add an opt-out flag so xterm can let the shell manage terminal mode normally.

https://github.com/webmin/webmin/issues/2452
2026-06-03 18:43:53 +02:00
Jamie Cameron
758aa4a9f7 Merge pull request #2744 from webmin/dev/fix-stale-mb
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Fix stale mailbox entries after deleted or moved
2026-06-02 21:37:54 -07:00
Jamie Cameron
b2dc27c063 Merge pull request #2747 from webmin/dev/deb-nm
Fix to detect NetworkManager networking on Debian
2026-06-02 21:04:04 -07:00
Ilia Ross
8dfee31542 Fix not to hardcode colors
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
2026-06-02 20:32:26 +02:00
Ilia Ross
a113309310 Add form grouped buttons API for responsive button
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
2026-06-02 13:34:31 +02:00
Ilia Ross
6574373761 Fix to detect NetworkManager networking on Debian
ⓘ Prefer Netplan when Debian has Netplan YAML config, otherwise select the existing NetworkManager backend for Debian systems with saved NM connection profiles, with regression tests for backend selection.

https://github.com/webmin/webmin/issues/2559
2026-06-02 01:33:59 +02:00
Ilia Ross
b33b9fb0a0 Fix NetworkManager IPv6 DNS nameserver saving
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
https://github.com/webmin/webmin/issues/2559
2026-06-02 01:12:24 +02:00
Ilia Ross
8ef12b66d7 Add Lucky Mobile SMS carrier #2738
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-06-01 01:00:11 +02:00
Ilia Ross
8df083b054 Fix Bell Canada SMS gateway domain #2739 2026-06-01 00:58:41 +02:00
Ilia Ross
435d2db4c6 Fix to use stronger defaults for generated keys
https://github.com/webmin/webmin/issues/2728
2026-05-31 20:42:33 +02:00
Ilia Ross
57b1ae3b18 Fix PHP-FPM monitor for EL /etc/php.ini
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
* Note: Map the shared EL PHP configuration file /etc/php.ini to the php-fpm boot action when that service exists, so the PHP-FPM status monitor can resolve current status on Rocky/RHEL systems.

root@rocky9-pro:~# php-fpm -i | grep "Loaded Configuration File"
Loaded Configuration File => /etc/php.ini

https://github.com/webmin/webmin/issues/2599
2026-05-31 16:14:38 +02:00
Ilia Ross
1eb4eb85a7 Fix to check empty mail files before opening 2026-05-30 21:22:38 +02:00
Jamie Cameron
fd79acd840 Properly quote and escape commands
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-05-30 10:22:17 -07:00
Ilia Ross
034d0a09ce Fix to skip unusable Maildir entries
* Note: Ignore zero-byte or unreadable Maildir files when listing messages, log skipped entries, and treat cached zero-byte reads as missing to avoid blank rows and inflated counts.
2026-05-30 16:13:55 +02:00
Ilia Ross
184887d365 Fix to use direct ACL checks in Kea DHCP module
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
*Note: Removes Kea-specific ACL wrapper helpers and switches ACL editor/runtime checks to standard Webmin handling with direct supplied ACL values and get_module_acl checks.
2026-05-30 02:53:48 +02:00
Ilia Ross
111dcb5f21 Fix to preserve submodule context in Virtualmin flows
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
https://forum.virtualmin.com/t/editing-server-block-configure-nginx-website-does-not-reload-nginx/137282/16?u=ilia
2026-05-30 02:29:04 +02:00
Ilia Ross
7cf7d14f53 Fix module desc 2026-05-29 22:25:42 +02:00
Ilia Ross
c68d03b211 Fix stale mailbox entries after deleted or moved
Refresh stale Maildir and sorted mailbox indexes when messages disappear, avoid rendering missing messages, and keep IMAP sort indexes in sync with mailbox count changes.
2026-05-29 21:12:58 +02:00
Ilia Ross
35a7459950 Fix temp file delete path validation
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
2026-05-29 16:59:05 +02:00
Jamie Cameron
5a9d2a2ca5 Merge pull request #2743 from webmin/dev/grub2
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add GRUB 2 boot loader module
2026-05-28 13:17:00 -07:00
Ilia Ross
3bc901fcb1 Remove pull request code review workflow [no-build] 2026-05-28 21:57:16 +02:00
Ilia Ross
8d09b0724c Fix to replace raw octal mode literals 2026-05-28 21:34:16 +02:00
Ilia Ross
7e8366bcb8 Fix to use direct ACL checks in GRUB 2 module
https://github.com/webmin/webmin/pull/2743#discussion_r3319948219
2026-05-28 21:21:56 +02:00
Ilia Ross
1335d05f7c Fix to harden GRUB manual editor allowlist 2026-05-28 14:50:00 +02:00
Ilia Ross
010f15c2a5 Fix Perl critic 2026-05-28 14:33:09 +02:00
Ilia Ross
e10acfa3bb Fix index page to implement view ACL better 2026-05-28 14:27:27 +02:00
Ilia Ross
440ddabef1 Fix ACL page sections 2026-05-28 14:26:45 +02:00
Ilia Ross
5232c07332 Fix to improve help text 2026-05-28 14:23:50 +02:00
Ilia Ross
53d0d053cf Fix comment clarity 2026-05-28 12:42:57 +02:00
Ilia Ross
1d369dcddf Revert "Fix theme"
This reverts commit 04efe99340.
2026-05-28 12:19:24 +02:00
Ilia Ross
270e26172b Fix theme
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-05-28 02:21:57 +02:00
Ilia Ross
523d68c67a Add GRUB 2 boot loader module
Adds a Webmin GRUB 2 module for inspecting boot entries, editing defaults, custom entries, themes, password protection, BLS-aware kernel options, safe menu regeneration, boot loader installation, manual config editing, status reporting, ACLs, backups, logging, and tests.
2026-05-28 02:20:53 +02:00
Ilia Ross
04efe99340 Fix theme 2026-05-28 01:39:07 +02:00
Jamie Cameron
5b58330071 Improve wording
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
https://github.com/webmin/webmin/issues/2726
2026-05-25 21:19:18 -07:00
Jamie Cameron
292d0d5a1f Quote new DB name so that case is preserved
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
https://github.com/webmin/webmin/issues/2727
2026-05-24 13:43:53 -07:00
Jamie Cameron
c9ce2ed6d8 Merge branch 'master' of github.com:webmin/webmin 2026-05-24 13:15:34 -07:00
Jamie Cameron
9b404f8feb Merge pull request #2741 from webmin/dev/postfix-tests-and-perlcritic
Postfix tests, perlcritic, strict/warnings, bugfixes
2026-05-24 13:10:38 -07:00
Jamie Cameron
197df80055 Merge branch 'master' of github.com:webmin/webmin 2026-05-24 13:09:03 -07:00
Jamie Cameron
6f4f85d33c Add UI option to control when update email is sent
https://github.com/webmin/webmin/issues/2726
2026-05-24 13:08:58 -07:00
Jamie Cameron
73821b72b0 Merge pull request #2729 from swelljoe/web-lib-funcs-test-data-transforms
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Add web-lib-funcs data transform tests
2026-05-23 19:25:00 -07:00
Joe Cooper
2d21c31ce2 Fix fatal 500 due to strict 2026-05-23 19:32:55 -05:00
Joe Cooper
afffe48e01 Fix double declarations from mechanical conversion 2026-05-23 18:58:15 -05:00
Joe Cooper
3ea7135cb2 s/$a/$alias/ 2026-05-23 18:11:30 -05:00
Joe Cooper
e6eb1c4983 s/$a/$alias/ 2026-05-23 18:10:58 -05:00
Jamie Cameron
3780c1a9b5 Merge pull request #2730 from swelljoe/xterm-tests
xterm unit tests and minor refactor for testing
2026-05-23 16:05:54 -07:00
Joe Cooper
675c830e84 Postfix tests, perlcritic, bugfixes 2026-05-23 17:15:31 -05:00
Jamie Cameron
74393cd312 Merge pull request #2737 from webmin/dev/bind8-tests-and-perlcritic
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Add bind8 tests, perlcritic, minor fixes
2026-05-23 08:43:32 -07:00
Joe Cooper
09bdd71c8c Fix the opendir fix for list context 2026-05-23 01:15:14 -05:00
Joe Cooper
1e77343482 Don't use temp var for eval result, not idiomatic 2026-05-23 01:04:05 -05:00
Joe Cooper
4b33d8bc3f catch failed dnssec-tools import 2026-05-23 00:59:53 -05:00
Joe Cooper
4bb0cda0b5 Fix missing error check on opendir 2026-05-23 00:49:41 -05:00
Joe Cooper
87536b42a1 Fix date_serial race in test 2026-05-23 00:18:57 -05:00
Joe Cooper
1a7a28f192 Add bind8 tests, perlcritic, minor fixes 2026-05-22 23:54:11 -05:00
Ilia Ross
91958ee2c0 Fix perlcritic (more)
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
2026-05-23 02:34:15 +02:00
Ilia Ross
eb779294fd Fix perlcritic 2026-05-23 02:24:03 +02:00
Ilia Ross
b9766d97a6 Fix mod 2026-05-23 02:14:27 +02:00
Ilia Ross
d8449b9417 Merge pull request #2736 from webmin/feat-add/kea-dhcp
Add new Kea DHCP server module
2026-05-23 02:11:46 +02:00
Ilia Ross
ad890156fa Add new Kea DHCP server module 2026-05-23 01:53:07 +02:00
Ilia Ross
6c74264916 Update close inactive workflow permissions [no-build] [no-review]
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
2026-05-22 20:26:25 +02:00
Jamie Cameron
ad3ddc489f Merge pull request #2719 from webmin/dev/fix-netplan
Fix to preserve Netplan YAML when saving DNS
2026-05-22 10:52:09 -07:00
Ilia Ross
87db158afc Fix to avoid large diffs when pretty 2026-05-22 15:06:37 +02:00
Ilia Ross
752d43adb8 Rename build workflow [no-build]
Some checks failed
Tests / prove (push) Has been cancelled
Build / build (push) Has been cancelled
2026-05-22 14:56:54 +02:00
Joe Cooper
76833b9e68 Add some ui-lib tests and fix quote escapes 2026-05-21 23:32:14 -05:00
Joe Cooper
140e4121b1 Merge pull request #2731 from swelljoe/update-t-readme
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
Close inactive / close-inactive (push) Has been cancelled
Update t/README.md to cover stringy eval
2026-05-21 23:41:29 -04:00
Joe Cooper
9de7560728 Update t/README.md to cover stringy eval 2026-05-21 22:30:44 -05:00
Joe Cooper
ed75034c98 No stringy eval 2026-05-21 19:19:46 -05:00
Joe Cooper
70cb2a700f Fix warnings 2026-05-21 19:12:23 -05:00
Joe Cooper
a24c79bb9f xterm unit tests and minor refactor for testing 2026-05-21 19:03:32 -05:00
Ilia Ross
685c07ffbb Fix Bacula restore browsing with Bacula 11+ catalogs #1520 2026-05-22 01:16:39 +02:00
Joe Cooper
2c4467a82e Handle lowercase 2FA secret 2026-05-21 18:01:25 -05:00
Joe Cooper
65c2a0da50 Fix warnings for undef in compare 2026-05-21 17:47:38 -05:00
Joe Cooper
da2090bad7 Add web-lib-funcs data transform tests 2026-05-21 17:21:44 -05:00
Ilia Ross
cc02cbabb4 Add inactive issue cleanup workflow [no-build]
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-21 13:50:06 +02:00
Jamie Cameron
05d42e4796 Merge pull request #2725 from swelljoe/bogus-bind-restriction
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
Allow underscore in TXT, CNAME, etc.
2026-05-20 20:47:40 -07:00
Jamie Cameron
5b9dc02948 Merge pull request #2723 from swelljoe/acl-perlcritic-and-fixes
acl perlcritic test and fixes
2026-05-20 20:43:59 -07:00
Joe Cooper
e83202988e Remove misleading backslash in regex 2026-05-20 20:51:26 -05:00
Joe Cooper
91f51f7390 Handle trailing dot, fix length check in mass_rcreate.cgi 2026-05-20 20:21:40 -05:00
Joe Cooper
d87808ca73 Allow underscore in TXT, CNAME, etc. 2026-05-20 19:54:18 -05:00
Jamie Cameron
16c16f4fd4 Merge pull request #2724 from swelljoe/test-web-lib-funcs-strings
Add ip, paths, string tests for web-lib-funcs
2026-05-20 15:50:13 -07:00
Joe Cooper
53c3bef94c Expand test coverage for check_ip6address 2026-05-20 16:36:28 -05:00
Joe Cooper
fc6b66fcc0 Fix spaces to tabs 2026-05-20 16:15:40 -05:00
Joe Cooper
100253bec3 Fix quirks in trunc and split_quoted_string 2026-05-20 15:55:07 -05:00
Joe Cooper
3e38e3268e Fix check_ip6address in miniserv 2026-05-20 14:04:53 -05:00
Joe Cooper
d2ba0d910b Fix check_ip6address in web-lib-funcs 2026-05-20 14:04:37 -05:00
Ilia Ross
cbc9595649 Add relaxed flag support
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-20 13:54:24 +02:00
Ilia Ross
6ed05b5e25 Add UI API to make div element 2026-05-20 13:54:23 +02:00
Joe Cooper
c487b579ed Add ip, paths, string tests for web-lib-funcs 2026-05-20 01:01:01 -05:00
Joe Cooper
522925403d Make strict refs happy 2026-05-19 22:16:43 -05:00
Joe Cooper
844b5f8174 Exclude ProhibitLeadingZeros from perlcritic, use .perlcriticrc 2026-05-19 20:40:29 -05:00
Joe Cooper
308cb0c71d perlcritic test and fixes 2026-05-19 19:53:15 -05:00
Jamie Cameron
93befb0a1a Merge branch 'master' of github.com:webmin/webmin
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-19 16:54:33 -07:00
Jamie Cameron
fc241dd8cd If extra logs were defined in the syslog module in the past but it is deprecated, move them over to the logviewer module
https://github.com/webmin/webmin/issues/2722
2026-05-19 16:53:47 -07:00
Ilia Ross
d26f4fb7f3 Merge pull request #2721 from swelljoe/fix-acl-bugs
Fixes minor bugs in acl surfaced by tests
2026-05-20 00:11:29 +02:00
Joe Cooper
28ba5883ef Make test match code more clearly 2026-05-19 16:59:34 -05:00
Ilia Ross
52d0382619 Fix regression and hide disabled default vhost files 2026-05-19 23:28:24 +02:00
Joe Cooper
1f8030a523 Also escape in clone path 2026-05-19 16:20:23 -05:00
Ilia Ross
d93fd6a4b6 Fix to harden vhost file handling
* Note: Resolve enabled-site link paths through ServerRoot and include disabled vhost file deletions in Apache config-test rollback coverage, with focused regressions.

https://github.com/webmin/webmin/actions/runs/26125036339/job/76836427985
2026-05-19 23:16:09 +02:00
Ilia Ross
a5be2f9d39 Add Debian-style sites-available file management to Apache
* Note: Bring the Apache module to parity with the Nginx module's Debian
sites-available/sites-enabled handling: list disabled vhost files
alongside active ones, toggle their state via symlink with apachectl
configtest rollback, and delete VirtualHost blocks from inactive files.
When Virtualmin manages a vhost, defer enable/disable to Virtualmin's
own forms instead of touching the symlink directly.

https://forum.virtualmin.com/t/enable-disable-toggle-buttons-in-ngnix-module/137238/4?u=ilia
2026-05-19 23:00:18 +02:00
Joe Cooper
8c2541fdc8 s/return undef/return/ 2026-05-19 15:43:45 -05:00
Joe Cooper
ef49236f6a Fixes minor bugs surfaced by tests 2026-05-19 15:13:33 -05:00
Ilia Ross
79adc13008 Fix to respect Virtualmin state for server files
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Use Virtualmin domain state for managed Nginx server files, block direct enable/disable toggles, and link users to the proper Virtualmin enable or disable action.

https://forum.virtualmin.com/t/enable-disable-toggle-buttons-in-ngnix-module/137238/4?u=ilia
2026-05-19 22:11:21 +02:00
Ilia Ross
3c20bd5a4f Merge pull request #2720 from swelljoe/acl-unit-tests
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
Add some acl unit tests
2026-05-19 11:49:48 +02:00
Ilia Ross
7f63875c42 Drop unnes quotemeta for params to be used 2026-05-19 11:25:34 +02:00
Joe Cooper
78c9e8f2c5 Add some acl unit tests 2026-05-18 23:24:41 -05:00
Jamie Cameron
b2fec1756d Merge pull request #2716 from swelljoe/miniserv-tests-trois
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
Even more unit tests for miniserv.pl
2026-05-18 20:30:47 -07:00
Ilia Ross
3e394323c7 Fix to validate manual config symlink targets
https://github.com/webmin/webmin/actions/runs/26066009981/job/76636877949
2026-05-19 01:40:08 +02:00
Ilia Ross
267f05ed73 Add raw config edit ACL and server shortcut
* Note: Gate manual Nginx config editing behind a dedicated ACL and add a per-server quick edit icon for the owning config file.
2026-05-19 01:16:19 +02:00
Ilia Ross
846bbb8252 Fix to preserve Netplan YAML when saving DNS
* Note: Preserve existing Netplan indentation when updating DNS settings, validate with netplan generate before applying, and surface apply errors to avoid network loss from malformed YAML.
2026-05-19 00:31:34 +02:00
Ilia Ross
578a41769e Add ability to show pending apply state after config changes 2026-05-18 23:05:25 +02:00
Ilia Ross
1d03afbdd5 Fix lang 2026-05-18 22:17:29 +02:00
Ilia Ross
41b8be4ac7 Fix to drop testing code 2026-05-18 22:16:59 +02:00
Ilia Ross
251fef722d Add site state toggles and proxy-aware server list
https://github.com/webmin/webmin/issues/2688
2026-05-18 22:08:36 +02:00
Ilia Ross
c1ba586dba Merge pull request #2715 from swelljoe/test-all-prs
Some checks failed
Tests / prove (push) Has been cancelled
webmin.dev: webmin/webmin / build (push) Has been cancelled
Test all PRs
2026-05-18 18:33:35 +02:00
Ilia Ross
3c8e1d0089 Merge pull request #2714 from swelljoe/nftables-perlcritic-again
Make perlcritic happy again
2026-05-18 16:59:11 +02:00
Ilia Ross
b6025b2fc2 Fix to revert "Code Review Test: Fix language strings improp"
This reverts commit 42142f7a5f.
2026-05-18 14:53:43 +02:00
Ilia Ross
42142f7a5f Code Review Test: Fix language strings improp 2026-05-18 14:36:03 +02:00
Ilia Ross
256046ed1f Fix to use cleaned DEB staging tree for source tarball
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2708#issuecomment-4473625945
2026-05-18 10:56:46 +02:00
Joe Cooper
d1c6e8d3a3 Even more tests for miniserv.pl 2026-05-18 00:46:20 -05:00
Joe Cooper
d81eb13f22 Run tests on PR, add docs 2026-05-17 23:33:59 -05:00
Joe Cooper
ab37804ef9 Add docs for coverage 2026-05-17 23:17:15 -05:00
Joe Cooper
9eff352005 Make perlcritic happy again 2026-05-17 22:25:03 -05:00
Jamie Cameron
4bdb518493 Merge pull request #2712 from swelljoe/fix-password-crypt-sha512
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Fix encrypt_sha512 so it doesn't always fall back to crypt
2026-05-17 18:41:40 -07:00
Joe Cooper
b658bdd3ed Remove comment noise about known bug in encrypt_sha512, as bug has been fixed by this PR 2026-05-17 19:30:38 -05:00
Joe Cooper
6458658bfb Fix encrypt_sha512 so it doesn't always fall back to crypt 2026-05-17 18:06:53 -05:00
Ilia Ross
c306818f50 Add PR code review workflow [no-build] 2026-05-18 00:49:32 +02:00
Ilia Ross
fa26f8699c Merge pull request #2709 from swelljoe/more-miniserv-tests
More miniserv.pl tests
2026-05-18 00:42:53 +02:00
Joe Cooper
b71c046596 More miniserv.pl tests 2026-05-17 17:28:21 -05:00
Ilia Ross
0216b7162f Code Review Test: Fix language strings bring back 2026-05-18 00:02:16 +02:00
Ilia Ross
d6d6b8806d Merge pull request #2708 from swelljoe/exclude-tests
Exclude t and xt from packages
2026-05-17 23:55:40 +02:00
Joe Cooper
9587d3d091 Exclude t and xt from packages 2026-05-17 16:24:19 -05:00
Ilia Ross
3b819eafb5 Merge pull request #2705 from swelljoe/miniserv-unit-tests
rename miniserv-http_error.t to miniserv.t, test all subs
2026-05-17 23:24:04 +02:00
Joe Cooper
49138dc5b5 Capture warnings, instead of silencing 2026-05-17 16:14:23 -05:00
Ilia Ross
21e3367a9c Code Review Test: Fix language strings improp 2026-05-17 21:39:06 +02:00
Ilia Ross
3f367adf8d Add code review SMTP secret [no-build]
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-17 20:45:20 +02:00
Ilia Ross
2d01675139 Fix reflected XSS in Webmin status messages
* Note: Escape the /webmin/ message parameter, strip restart redirect HTML to plain text, and harden filter_javascript().
2026-05-17 14:32:10 +02:00
Ilia Ross
e60d005ab0 Fix to enforce RPC-only users before module ACL check
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Block `rpc=3` users from normal Webmin UI before `init_config` marks module ACLs checked, while explicitly allowing RPC endpoints.

https://github.com/webmin/webmin/actions/runs/25971500591/job/76344191751

45292ea815
2026-05-17 00:55:15 +02:00
Ilia Ross
7d129ee5e1 Code Review Test: Fix back 2026-05-17 00:41:26 +02:00
Ilia Ross
14abf9f938 Code Review Test: Fix language strings (try more) 2026-05-17 00:39:42 +02:00
Ilia Ross
f508c58929 Code Review Test: Fix back 2026-05-17 00:38:19 +02:00
Ilia Ross
3cff366b1f Code Review Test: Fix language strings (try again)
This reverts commit e4b7e97848.
2026-05-17 00:34:57 +02:00
Ilia Ross
e4b7e97848 Revert "Code Review Test: Fix language strings"
This reverts commit 257fc2d87c.
2026-05-17 00:34:50 +02:00
Joe Cooper
bf5ae8b5e5 Accomodate modification in place
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-16 18:33:55 -04:00
Ilia Ross
257fc2d87c Code Review Test: Fix language strings 2026-05-17 00:28:52 +02:00
Jamie Cameron
45292ea815 Respect the RPC-only setting for users 2026-05-16 12:59:58 -07:00
Jamie Cameron
1d4556b905 Add new option for RPC-only mode, and a help page 2026-05-16 12:40:12 -07:00
Jamie Cameron
4cceba5f8f Delete RBAC perl module we no longer use 2026-05-16 12:30:03 -07:00
Jamie Cameron
d41377983e Move the option that controls if a user can accept RPC calls out of the global ACL and into a more findable location in the Edit User page 2026-05-16 12:16:29 -07:00
Jamie Cameron
f65fe5b44c Merge branch 'master' of github.com:webmin/webmin 2026-05-16 12:03:12 -07:00
Jamie Cameron
ccbe7369dd Delete all RBAC-related code from the Webmin Users module, since this is a niche unsupported feature 2026-05-16 12:02:58 -07:00
Ilia Ross
d0f6a7672f Fix placeholder
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-16 20:09:59 +02:00
Jamie Cameron
042891c941 Merge branch 'master' of github.com:webmin/webmin 2026-05-16 09:52:09 -07:00
Jamie Cameron
af175ce12c Drop ancient support for RBAC-controller Webmin ACLs 2026-05-16 09:49:36 -07:00
Ilia Ross
065ce627a0 Add quick service and port forward controls
* Note: Add lightweight quick controls for allowed ports, services, and port forwards, with service autocomplete, ACLs, and structured NAT redirect/DNAT editing.
2026-05-16 15:55:28 +02:00
Ilia Ross
869173d7c6 Fix partial print 2026-05-16 15:55:27 +02:00
Jamie Cameron
1a86501e88 Delete code and languages related to email feedback feature that is no longer linked to, or useful
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-15 16:51:34 -07:00
Jamie Cameron
60a9bc010c Code cleanup 2026-05-15 16:46:30 -07:00
Jamie Cameron
86b9014b21 Merge branch 'master' of github.com:webmin/webmin 2026-05-15 16:43:37 -07:00
Jamie Cameron
dd4e3e22ef Allow global permissions to be set for new users 2026-05-15 16:43:29 -07:00
Ilia Ross
361d3b5175 Add ability to discover profile service ports dynamically
* Note: Resolve nftables profile service ports from supported Webmin module configs and /etc/services, with safe fallbacks and SSH custom-port regression coverage.

https://github.com/webmin/webmin/issues/2706
2026-05-15 21:26:15 +02:00
Ilia Ross
aa87f85d4a Fix man module opts URL escaping
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-15 12:58:12 +02:00
Jamie Cameron
8159fad28f Escape URL parameter for safety
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-14 21:14:45 -07:00
Jamie Cameron
4fa30e782e Merge branch 'master' of github.com:webmin/webmin 2026-05-14 19:58:02 -07:00
Jamie Cameron
b251b7182c Quota all parameters 2026-05-14 19:57:42 -07:00
Ilia Ross
aeaa9333b8 Code Review Test: Fix language string final
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-14 22:00:21 +02:00
Ilia Ross
585293fbd3 Code Review Test: Fix language strings once more 2026-05-14 21:59:08 +02:00
Ilia Ross
ae2c6a4301 Code Review Test: Fix language strings more 2026-05-14 21:53:51 +02:00
Ilia Ross
4e734a9bd0 Code Review Test: Fix language strings 2026-05-14 21:44:30 +02:00
Ilia Ross
222d92e392 Rename CI code review secret [no-build] 2026-05-14 21:38:43 +02:00
Ilia Ross
de8e5e36d8 Add Anthropic API key to CI secrets [no-build] 2026-05-14 20:58:42 +02:00
Jamie Cameron
e36729f20b Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-13 20:56:25 -07:00
Jamie Cameron
96dd0ef65d Harden check for valid SSL SNI hostname 2026-05-13 20:56:18 -07:00
Ilia Ross
d367189711 Fix to reset remaining per-request keep-alive state too
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2699#issuecomment-4435490798
2026-05-14 00:38:34 +02:00
Ilia Ross
0db0cf77f9 Fix to disregard silly new line option 2026-05-13 23:12:42 +02:00
Joe Cooper
d3c9f331c8 rename miniserv-http_error.t to miniserv.t, test all subs 2026-05-13 13:11:43 -05:00
Jamie Cameron
7dd3902da8 Merge pull request #2699 from swelljoe/keep-alive-auth-state
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Reset auth state in keep-alive proxied requests
2026-05-12 19:55:13 -07:00
Ilia Ross
413087ae84 Fix MariaDB create user auth plugin syntax
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Use MariaDB-compatible IDENTIFIED VIA ... USING PASSWORD(...) syntax when creating users with an explicit authentication plugin, while preserving default password creation and MySQL behavior.

https://forum.virtualmin.com/t/mariadb-syntax-change-on-rocky-10/137187
2026-05-13 02:20:42 +02:00
Ilia Ross
911aa64a36 Fix systemd multiline ExecStart handling
* Note: Generate separate ExecStart= entries for newline-separated systemd start commands and set Type=oneshot when required.

https://github.com/webmin/webmin/issues/2697
2026-05-13 01:06:57 +02:00
Ilia Ross
c6647ce76c Fix to scope SSL cert auth user to one request
* Note: Declare the SSL certificate lookup user as lexical inside `handle_request`, so a previously matched client certificate user cannot survive into later keep-alive requests handled by the same miniserv child.

Enlightened by: https://github.com/webmin/webmin/pull/2699
2026-05-13 00:46:39 +02:00
Joe Cooper
0b478a1940 Merge pull request #2702 from swelljoe/master
Ignore ugly require in acl_security.pl
2026-05-12 18:18:15 -04:00
Joe Cooper
2b8091537c Ignore ugly require in acl_security.pl 2026-05-12 16:31:24 -05:00
Ilia Ross
0863d6ba7a Revert #2700 reverted but only fix exact bug
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
This reverts commit 0d3e3d9473, reversing
changes made to 236c5cf489.
2026-05-12 18:01:16 +02:00
Ilia Ross
d46c8f20d5 Fix escapes 2026-05-12 17:51:37 +02:00
Ilia Ross
0d3e3d9473 Merge pull request #2700 from webmin/revert-2698-nftables-perlcritic
Revert "perlcritic fixes"
2026-05-12 13:01:46 +02:00
Ilia Ross
084f7b7314 Revert "perlcritic fixes" 2026-05-12 13:00:03 +02:00
Joe Cooper
29952dce1e Also reset already_authuser 2026-05-11 21:57:34 -05:00
Joe Cooper
d202eca8f8 Probably resolve proxied keep-alive requests retain auth state 2026-05-11 21:46:10 -05:00
Jamie Cameron
236c5cf489 Merge pull request #2695 from swelljoe/minserv-as-module
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Wrap miniserv.pl server loop in unless (caller) so we can require miniserv for unit testing
2026-05-11 19:38:06 -07:00
Jamie Cameron
99371ad462 Merge pull request #2698 from swelljoe/nftables-perlcritic
perlcritic fixes
2026-05-11 19:22:25 -07:00
Joe Cooper
a9aae79fcd perlcritic fixes 2026-05-11 20:37:30 -05:00
Ilia Ross
04ae776e6a Fix to validate action paths
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Validate File Manager action name/file parameters as checked paths under the current directory and `allowed_paths` before operations, blocking traversal and symlink escapes.
2026-05-12 01:25:57 +02:00
Ilia Ross
7cab23a3ea Fix to validate upload paths before writing
* Note: Canonicalize and check uploaded file and directory-upload paths against `allowed_paths` before creating directories or writing files, preventing traversal outside the File Manager ACL sandbox.
2026-05-12 00:05:02 +02:00
Ilia Ross
04c33e77a4 Add optional pre and post scripts for scheduled package updates
https://forum.virtualmin.com/t/add-option-to-run-a-custom-command-following-all-scheduled-package-updates/136397
2026-05-11 22:06:20 +02:00
Ilia Ross
9dccd2cdce Add comments
[no-build]
2026-05-11 21:16:26 +02:00
Ilia Ross
1645cadc91 Fix stored passphrase file lookup
* Note: Make passphrase lookup use the same fallback path for full fingerprints, key IDs, and legacy generic passphrase files.

https://forum.virtualmin.com/t/usermin-gpg-encryption/136781/8?u=ilia
2026-05-11 21:14:12 +02:00
Jamie Cameron
2c8ff4ba15 Merge pull request #2692 from swelljoe/session-dbm
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Prefer SHA over MD5 or crypt for session hash, other minor session tweaks
2026-05-10 22:03:47 -07:00
Joe Cooper
da0ff56ee0 Cleanup ASCII decorations 2026-05-10 23:04:08 -05:00
Joe Cooper
bf43c793d3 qualify the test name, since other files will get tests 2026-05-10 22:57:15 -05:00
Joe Cooper
46d571c6b5 Add http_error unit tests as useful example 2026-05-10 22:55:41 -05:00
Jamie Cameron
ce1ab74c6f Merge pull request #2694 from swelljoe/login-redirect-password
Remove login_redirect
2026-05-10 20:13:52 -07:00
Joe Cooper
4472f210b9 Wrap app in unless (caller) so we can require miniserv for unit testing 2026-05-10 22:11:21 -05:00
Joe Cooper
7aeb5e4dd7 Only create session key file when session=1 2026-05-10 20:57:09 -05:00
Joe Cooper
77d817357d Remove login_redirect 2026-05-10 20:52:09 -05:00
Jamie Cameron
350908ed56 changelog update 2026-05-10 17:56:11 -07:00
Jamie Cameron
94ac2ff7d7 New version bump 2026-05-10 17:46:56 -07:00
Jamie Cameron
a24e5371b7 Merge pull request #2691 from swelljoe/add-trusted-proxies
Add trusted_proxies config
2026-05-10 17:37:42 -07:00
Ilia Ross
0810083588 Fix skip hwclock when unavailable #2693
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-10 19:48:18 +02:00
Ilia Ross
2ec6cadbbd Fix not to print newly created module config dirs to stdout 2026-05-10 19:36:28 +02:00
Joe Cooper
4c3f7f5bd9 Omit needless words 2026-05-10 10:58:50 -05:00
Joe Cooper
1b5e48841a Don't fall back to weak session hash, use SHA instead 2026-05-10 03:36:07 -05:00
Joe Cooper
241abfe719 Add trusted_proxies config 2026-05-10 01:19:01 -05:00
Ilia Ross
f78413549b Fix Perl warning
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-10 01:51:40 +02:00
Ilia Ross
b53cce9084 Add logging option to execute command sub
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
299b10a0e8 (r184647207)
2026-05-08 12:31:16 +02:00
Ilia Ross
a92b52f502 Fix text variable typo
https://github.com/webmin/webmin/issues/2686
2026-05-08 11:48:13 +02:00
Jamie Cameron
c0c0cc323c Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-06 20:14:54 -07:00
Jamie Cameron
da49c5b9b8 Safely quote slave param 2026-05-06 20:14:30 -07:00
Ilia Ross
5b5c3cc4b1 Fix sensor parsing on SoC hardware where the main chip includes the CPU
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/cpu-temp-id-missing-dashboard/123096/9?u=ilia
2026-05-06 22:16:53 +02:00
Ilia Ross
f0b7f10b64 Fix Fail2Ban default jail options
https://forum.virtualmin.com/t/fail2ban-bug/137165
2026-05-06 19:59:57 +02:00
Ilia Ross
bdad9fd173 Update changelog
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[no-build]
2026-05-05 23:49:21 +02:00
Ilia Ross
7e01b3eb44 Fix to set XDG runtime and D-Bus env in xterm shells
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2679
2026-05-05 09:41:45 +02:00
Ilia Ross
95fee0cc33 Add nice header generation for saved nftables rules
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-04 17:42:40 +02:00
Jamie Cameron
18a6fc3b53 Fix label
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-03 17:59:52 -07:00
Jamie Cameron
c38793c955 Fix permissions on CGIs 2026-05-03 17:57:24 -07:00
Ilia Ross
45376dee35 Update changelog 2026-05-04 01:29:06 +02:00
Ilia Ross
44ff20e5c6 Fix to perltidy new nftables module to convert spaces to tabs
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-03 22:36:31 +02:00
Ilia Ross
159cc14dfc Add a warning message if any foreign firewall modules are detected 2026-05-03 21:39:28 +02:00
Ilia Ross
aa84044375 Add boot-time apply support for nftables rules
* Note: The boot action applies saved module-managed nftables tables, creates the needed wrapper, fixes executable permissions, and removes generated boot files when disabled.
2026-05-03 20:23:48 +02:00
Ilia Ross
02b5c9c121 Fix limit nftables header actions to index page 2026-05-03 19:25:38 +02:00
Ilia Ross
b5518df7bd Fix editable size 2026-05-03 19:13:24 +02:00
Ilia Ross
2c608b2c71 Fix to bump sets elements limit
[no-build]
2026-05-03 19:02:32 +02:00
Ilia Ross
d1523b9648 Add nftables profile ruleset helper
* Note: Add a reusable save_profile_ruleset() API for other modules (like Virtualmin Config), and.

Example:

foreign_require("nftables");
nftables::save_profile_ruleset('profile_virtualmin', 'virtualmin', '*');
2026-05-03 19:00:01 +02:00
Ilia Ross
9987b2d493 Update labels (again) 2026-05-03 18:52:31 +02:00
Ilia Ross
83eb3eeffc Fix to factor nftables profile ruleset generation into library 2026-05-03 18:41:57 +02:00
Ilia Ross
a6e6b1d21c Fix to normalize text keys to work properly with iconed buttons 2026-05-03 18:34:32 +02:00
Ilia Ross
e65c88e7ef Fix to drop another footgun with configurable rules file 2026-05-03 18:05:59 +02:00
Ilia Ross
2bcf00b50d Fix nftables and firewall modules title for consistency and clarity
* Note: Rename legacy iptables firewalls and make nftables the Linux Firewall
2026-05-03 17:57:48 +02:00
Ilia Ross
eb4fafc504 Add missing comments 2026-05-03 17:17:40 +02:00
Ilia Ross
5101871760 Add manual editing for nftables configuration files 2026-05-03 17:12:35 +02:00
Ilia Ross
0c8f74597b Add proper ACLs to nftables module
[no-build]
2026-05-03 16:44:26 +02:00
Ilia Ross
d3a09db938 Fix text consistency 2026-05-03 15:45:25 +02:00
Ilia Ross
f4fea0026f Fix to generate nftables profiles with service port sets instead
* Note: Create profile rulesets using named inet_service sets for selected service ports instead of emitting one accept rule per port. Keep scoped rules such as DHCPv6 and mDNS explicit, split TCP and UDP port sets to avoid widening access, and normalize interval set elements so ranges are valid and non-overlapping.
2026-05-03 15:40:30 +02:00
Ilia Ross
dbb19c30c4 Remove restart button from other pages for consistency 2026-05-03 15:08:51 +02:00
Ilia Ross
5c66e544b1 Add ability to flush all clearable tables at once 2026-05-03 15:03:36 +02:00
Ilia Ross
5671bd4ce6 Fix file locking 2026-05-03 14:49:32 +02:00
Ilia Ross
12eff54277 Add nftables apply-needed header action
* Note: Track saved nftables configuration changes with Apache-style config/apply timestamp flags, expose the standard restart.cgi header action for themes, and use it as the single apply endpoint. The button expands to “Apply Changes” when saved rules need applying, while the existing Apply Configuration action now routes through restart.cgi and clears the pending state after a successful apply.
2026-05-03 13:59:58 +02:00
Ilia Ross
6c1de362e3 Fix locked profile 2026-05-03 13:14:23 +02:00
Ilia Ross
1d2e1983bf Fix wording 2026-05-03 13:07:46 +02:00
Ilia Ross
91f7d5b5c5 Add a quick allow and quick block UI feature 2026-05-03 13:05:31 +02:00
Ilia Ross
9d7f4f9d05 Fix profiles
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[no-build]
2026-05-03 00:44:56 +02:00
Ilia Ross
bedca1546b Fix to revert to using a table for links and move buttons 2026-05-03 00:44:56 +02:00
Ilia Ross
0e4349565a Fix to return on redirect 2026-05-03 00:44:55 +02:00
Ilia Ross
a0fb85c152 Fix language when importing a table 2026-05-03 00:44:55 +02:00
Ilia Ross
599caa1cd8 Fix to simplify language sting 2026-05-03 00:44:55 +02:00
Ilia Ross
1d5b426043 Add active nftables table clear action 2026-05-03 00:44:55 +02:00
Ilia Ross
d61852cc72 Fix to use conventional layout for delete confirmation 2026-05-03 00:44:54 +02:00
Ilia Ross
fd567e6860 Fix to delete nftables tables from active ruleset
* Note: When a table is deleted from the nftables module, also remove that same table from the active kernel ruleset. The delete path now updates the saved Webmin configuration first, then runs a targeted nft delete table for the selected table only, after checking that the active table is not externally managed.
2026-05-03 00:44:54 +02:00
Ilia Ross
0cdcb932b1 Drop showing unnecessary label when empty 2026-05-03 00:44:54 +02:00
Ilia Ross
2fe57dd456 Fix to validate nftables set usage in rules
* Note: Prevent incompatible nftables sets from being used in rule fields. The rule editor now only offers address sets for address matches and port/service sets for port matches, while save and apply paths validate existing set references before writing or loading rules. This avoids nft datatype mismatch errors such as using inet_proto sets with tcp dport.
2026-05-03 00:44:54 +02:00
Ilia Ross
c8bcccd9b9 Fix sets textarea take whole row 2026-05-03 00:44:54 +02:00
Ilia Ross
272a8715f7 Add profiles support 2026-05-03 00:44:54 +02:00
Jamie Cameron
a664b9d0c0 Add option to turn off running commands 2026-05-02 15:33:41 -07:00
Jamie Cameron
80d1e688c8 Prep for new version
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-02 10:19:39 -07:00
Ilia Ross
3c9d53109b Fix to rework nftables management around saved tables
Rework the nftables module so Webmin manages its saved nftables configuration as the source of truth instead of directly editing the live ruleset. Add an active ruleset view for inspecting live tables and importing copies into Webmin-managed config if needed, track managed and imported tables with metadata, and prevent externally managed tables from being overwritten during apply.

Co-authored-by: Copilot <copilot@github.com>
2026-05-02 19:02:37 +02:00
Ilia Ross
6825dc11d6 Fix to delete chains and sets immediately 2026-05-02 17:30:59 +02:00
Ilia Ross
1ed1ff84a2 Fix to use tabs over spaces 2026-05-02 17:18:54 +02:00
Ilia Ross
4220d18072 Fix to improve table, chain and set management UI
Rework the nftables index page to make table, chain, and set management clearer. Move table actions next to the table selector, split chains and sets into tabs, use checked tables with standard select/invert controls for bulk deletes, move Add Rule into the Actions column, and replace nested rule tables with tag-based row layout.
2026-05-02 17:11:29 +02:00
Ilia Ross
7f2b4b00aa Fix to scope direct-mode changes to selected tables
Fix nftables direct-mode operations so create, edit, delete, and move actions apply only the selected table instead of rewriting or applying the full ruleset. This avoids copying firewalld-owned rules, or any other externally managed rules, into Webmin’s save file and prevents operations from failing against externally managed tables. Also remove previously added unsafe full-ruleset flush action and keep Apply Configuration out of direct mode (will be further reworked).
2026-05-02 17:08:35 +02:00
Ilia Ross
6fb304e384 Add a separate button for flushing active rulesets
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[rebuild-all-modules]
2026-05-02 02:00:11 +02:00
Ilia Ross
82e9e1c7dd Fix to place new nftables module to the right stack 2026-05-02 01:25:05 +02:00
Ilia Ross
2dcb17c408 Fix parser to accept chain priorities 2026-05-02 01:10:53 +02:00
Ilia Ross
684bb4cc67 Fix module check 2026-05-02 00:38:19 +02:00
Ilia Ross
1d67452a00 Fix to factor out command check 2026-05-02 00:34:15 +02:00
Ilia Ross
a6db30bb49 Add missing config defaults 2026-05-02 00:31:34 +02:00
Ilia Ross
df9eb7239b Add nftables to the core 2026-05-01 23:42:14 +02:00
Ilia Ross
8eb0868574 Fix to install correct MariaDB config on Ubuntu 26.04
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-01 21:52:05 +02:00
Ilia Ross
95b43e91e1 Update DHCP default config for openSUSE 16 #2678
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-01 00:47:49 +02:00
Ilia Ross
f8bdac8e90 Add support for modern (Ubuntu 26.04) MariaDB
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Recognize mariadbd option groups and binaries in MySQL config, SSL, syslog, and safe-mode command discovery while preserving existing mysqld/mariadb compatibility.
2026-04-30 21:47:57 +02:00
Jamie Cameron
1293a2cf4f Add mass enable and disable buttons
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-28 21:33:16 -07:00
Jamie Cameron
f0a5b92b18 Clean up comment position
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-26 22:00:49 -07:00
Jamie Cameron
dc4668a6b4 Make it possible to disable reporting entirely, but leave a monitor active
https://github.com/webmin/webmin/issues/2677
2026-04-26 22:00:27 -07:00
Jamie Cameron
60951853a9 , 2026-04-26 21:44:23 -07:00
Ilia Ross
d4208ada15 Add extra flag to module info
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-26 21:38:05 +02:00
Ilia Ross
122752f384 Add default extra directives for Nginx server blocks 2026-04-26 20:19:45 +02:00
Jamie Cameron
83a0156217 Merge pull request #2676 from mnoorenberghe/fix-ping-pid-truncation
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Fix ping status PID check to use 16 bits for comparison
2026-04-25 21:36:08 -07:00
Matt N.
1bb477d2ee Fix ping status PID check to use 16 bits for comparison
If `/proc/sys/kernel/pid_max` exceeds 16 bits then the ping check could incorrectly fail.
2026-04-25 20:18:17 -07:00
Ilia Ross
c9e577e220 Update a new Nginx module to look and feel like Apache
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-26 00:05:16 +02:00
Ilia Ross
3977873c0e Fix textarea height 2026-04-25 19:45:43 +02:00
Ilia Ross
d0604b5d4d Fix to correctly handle various indentation cases 2026-04-25 19:38:59 +02:00
Ilia Ross
41e32f4e37 Add Nginx module and make part of the full modules list
https://forum.virtualmin.com/t/virtual-nginx-module-port-to-webmin/137074/13?u=ilia
2026-04-25 19:38:04 +02:00
Ilia Ross
a7afa3a4f6 Update translations
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-24 22:36:48 +02:00
Ilia Ross
db17606643 Fix clarify remember-me authentication option label
https://github.com/webmin/webmin/issues/2674
2026-04-24 22:35:03 +02:00
Ilia Ross
7c7ee616f0 Add a blank default option to the monitor type selector
https://github.com/webmin/webmin/issues/2675

Co-authored-by: Copilot <copilot@github.com>
2026-04-24 22:28:00 +02:00
Jamie Cameron
fd9b736175 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-23 21:30:08 -07:00
Jamie Cameron
25afc8aa02 Make functions for setting and getting back headers more consistent 2026-04-23 21:28:14 -07:00
Ilia Ross
68aab1c057 Fix to use proper API for ACL pages
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[no-build]
2026-04-23 22:07:13 +02:00
Ilia Ross
19190a6f5b Fix ACL option name 2026-04-23 21:00:32 +02:00
Ilia Ross
cf432879a1 Fix unsafe mailbox attachment handling
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-23 18:00:07 +02:00
Jamie Cameron
cef294dc5a Code readability cleanup
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-22 17:04:51 -07:00
Jamie Cameron
843fc26d97 Clean up wording
https://github.com/webmin/webmin/issues/2661
2026-04-22 11:38:57 -07:00
Jamie Cameron
25f15ce10e Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-22 08:29:59 -07:00
Ilia Ross
cc9c51c42f Fix potential stored XSS 2026-04-22 13:59:42 +02:00
Jamie Cameron
6a61d50078 Fix label to reflect reality
https://github.com/webmin/webmin/issues/2661
2026-04-21 21:51:37 -07:00
Ilia Ross
948f5bfd77 Fix to make MML files editable
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2671
2026-04-21 21:16:55 +02:00
Ilia Ross
73fadd13c8 Fix to decode Outlook winmail.dat with Convert::TNEF safely
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Replace external tnef/opentnef shelling with Convert::TNEF for
application/ms-tnef attachments.

For root-run Webmin mailbox parsing, decode TNEF as the mailbox owner
instead of root by carrying open_user on mail objects and switching to
that user for the parser temp-file work.

https://github.com/webmin/usermin/issues/132
2026-04-20 19:42:22 +02:00
Ilia Ross
d567b09d24 Fix to handle Certbot standalone port conflicts
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Add Certbot port-80 warnings and shared runtime checks, while respecting pre-request hooks that may free the port before standalone validation runs.

https://github.com/webmin/webmin/issues/2669#issuecomment-4274711184
2026-04-19 02:00:21 +02:00
Ilia Ross
12069d87af Fix to redirect to SSL edit page with Let's Encrypt tab
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
544703c1b8 (r182819336)
2026-04-19 00:11:17 +02:00
Ilia Ross
6c211e721c Update translations 2026-04-18 19:50:53 +02:00
Ilia Ross
bb39d752a9 Update description text and UX 2026-04-18 19:50:26 +02:00
Ilia Ross
ae35b100c2 Update tiny ACME client 2026-04-18 19:35:27 +02:00
Ilia Ross
84c50bba95 Update translations 2026-04-18 19:35:09 +02:00
Ilia Ross
544703c1b8 Add custom ACME server support to Webmin SSL renewal
* Note: Adds support for custom ACME directory URLs in Webmin’s SSL certificate flow, including optional EAB credentials, renewal persistence, and compatibility fixes for saved validation modes.

https://github.com/webmin/webmin/issues/2669
2026-04-18 19:34:03 +02:00
Ilia Ross
44c7b36160 Fix saved LE validation mode handling
https://github.com/webmin/webmin/issues/2669
2026-04-18 14:59:51 +02:00
Ilia Ross
6639768aa4 Update comments in repo setup
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-17 17:34:34 +02:00
Ilia Ross
39a4b9454d Fix to improve temporary file handling in repo setup 2026-04-17 17:31:25 +02:00
Ilia Ross
9d6b7bc939 Fix to handle sources list cleanup more safely in repo setup
https://github.com/webmin/webmin/issues/2277#issuecomment-4230377785
2026-04-17 15:53:34 +02:00
Ilia Ross
4f3e993ae6 Merge swelljoe/nftables as new nftables module
Import https://github.com/swelljoe/nftables into the Webmin tree under nftables/ while preserving upstream history.
2026-04-17 15:19:20 +02:00
Ilia Ross
632232fff0 Update .gitignore
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[no-build]
2026-04-17 14:43:06 +02:00
Ilia Ross
4d680b1ea9 Fix SHA512/yescrypt error messages to reflect crypt() support
https://github.com/webmin/webmin/issues/2656
2026-04-17 14:36:27 +02:00
Jamie Cameron
f03140314e Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-16 20:02:02 -07:00
Jamie Cameron
6c77b24da6 The crypt function can natively support SHA512
https://github.com/webmin/webmin/issues/2656
2026-04-16 20:01:55 -07:00
Ilia Ross
a293fff996 Fix to default TOTP QR generation to QRCode::Encoder
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Webmin now uses the bundled QRCode::Encoder implementation by default to generate TOTP QR codes locally and inline, without relying on qr.cgi or external services.

This encoder requires Perl 5.24 or newer, so qrencode is no longer included as a recommended package dependency. On older systems where the bundled encoder cannot run, admins can still install qrencode manually to restore QR generation support.

Systems old enough to lack Perl 5.24 are typically already well past their supported security lifecycle, so keeping qrencode preinstalled by default is no longer treated as a packaging requirement. When neither option is available, Webmin falls back cleanly to manual TOTP setup using the shared secret.

https://github.com/webmin/webmin/issues/2667#issuecomment-4247431279

[no-build]
2026-04-16 23:08:00 +02:00
Ilia Ross
da18a16c84 Fix to require 2FA for RPC basic auth
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
+ improve remote auth errors
2026-04-15 22:36:40 +02:00
Jamie Cameron
0424a98a9b Fall back to uisng df if disk space cannot be computed from the zpool
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2653
2026-04-14 19:55:13 -07:00
Jamie Cameron
ba336c297b Make check for 'X-SSL-Client-Verify' header stricter 2026-04-14 16:19:22 -07:00
Jamie Cameron
7183af2fdd Compute used and used percent for ZFS
https://github.com/webmin/webmin/issues/2653
2026-04-14 16:16:54 -07:00
Jamie Cameron
02dd602d07 Merge branch 'master' of github.com:webmin/webmin 2026-04-14 16:09:26 -07:00
Jamie Cameron
59fae69c6b Missing return statement 2026-04-14 16:09:20 -07:00
Ilia Ross
3bd85ab407 Add multi-statement SQL script support when executing inline script
https://forum.virtualmin.com/t/edit-databases-sql-query-box-strange-behavior/136988

[no-build]
2026-04-14 23:02:15 +02:00
Ilia Ross
87d8969efb Fix to gate forwarded proxy URL for consistency
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2666#issuecomment-4241962133
2026-04-14 14:44:57 +02:00
Ilia Ross
97774b829d Fix to trust forwarded URL headers if proxy headers are trusted
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2666
2026-04-13 15:55:31 +02:00
Ilia Ross
33e03595cf Merge pull request #2666 from swelljoe/proxy-friendly-get_webmin_browser_url
Make get_webmin_browser_url proxy-aware
2026-04-13 15:31:08 +02:00
Jamie Cameron
4b79787fb2 Direct links to xterm do not need to be supported
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-12 13:01:23 -07:00
Ilia Ross
bd7e91c712 Fix comment shift ; add missing comments
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-12 19:03:12 +02:00
Ilia Ross
67950afe3a Add configurable redaction for logged request parameters 2026-04-12 19:01:14 +02:00
Ilia Ross
a6156ff76b Add configurable websocket origin exceptions (for weird cases) 2026-04-12 18:35:21 +02:00
Ilia Ross
6de6529bba Fix to harden session cookie defaults 2026-04-12 18:17:32 +02:00
Ilia Ross
cf98ce3f55 Fix to normalize websocket path matching 2026-04-12 18:10:22 +02:00
Ilia Ross
c0fb00a6e4 Fix to improve proxied connection validation
X260412
2026-04-12 18:08:57 +02:00
Ilia Ross
49b8f1a2fa Fix to improve proxied connection handling
X260412
2026-04-12 14:56:51 +02:00
Joe Cooper
3a1df9d797 Make get_webmin_browser_url proxy-aware 2026-04-11 15:41:40 -05:00
Ilia Ross
11fafb738d Fix to only show safe files in browser
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/1907#issuecomment-4226036213
2026-04-11 18:25:22 +02:00
Ilia Ross
0c2987a326 Fix to support new alerts in Framed Theme too 2026-04-11 17:45:15 +02:00
Ilia Ross
f37a73f0fb Add support for Apache 2.4 access control editing
https://github.com/webmin/webmin/issues/1700#issuecomment-4226653490
2026-04-11 17:44:46 +02:00
Ilia Ross
07321eec44 Add self-contained perltidy wrapper for Webmin style formatting
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-10 21:15:33 +02:00
Ilia Ross
ac8cbf57f9 Fix to handle HTTPS update sources with outbound SSL fallback 2026-04-10 18:56:41 +02:00
Ilia Ross
995f4fa6c1 Fix to normalize URLs (more)
https://github.com/webmin/webmin/issues/2663
2026-04-10 15:32:26 +02:00
Ilia Ross
3f3a84c830 Fix to normalize URLs (more)
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2663
2026-04-10 15:27:28 +02:00
Ilia Ross
dde3f1642e Fix to normalize URLs
https://github.com/webmin/webmin/issues/2663
2026-04-10 13:45:14 +02:00
Ilia Ross
2c01d21a1d Add comments
https://github.com/webmin/webmin/issues/2615
2026-04-10 13:17:51 +02:00
Ilia Ross
6337f2fefa Add tiny compatibility helper that builds ANSI escape strings
https://github.com/webmin/webmin/issues/2615
2026-04-10 13:12:05 +02:00
Ilia Ross
de9e95facf Add support for ext4 hidden inode (superblock) quota mode
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/quotacheck-fails-with-unknown-quota-format-on-ext4-native-quota-ubuntu-24-04/136963/
2026-04-09 22:11:47 +02:00
Ilia Ross
5cf228d4a0 Add side by side UI form buttons API
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2659

[no-build]
2026-04-09 19:33:37 +02:00
Ilia Ross
0e45e0bcbd Update translations consistency
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2655
2026-04-09 00:11:17 +02:00
Ilia Ross
bdb98c49c9 Fix language
https://github.com/webmin/webmin/issues/2655
2026-04-09 00:08:07 +02:00
Ilia Ross
9369441fc5 Fix to avoid auto-fill for URL auth
https://github.com/webmin/webmin/issues/2655
2026-04-09 00:07:08 +02:00
Ilia Ross
77e488b4b6 filemin: reindent and add function comments 2026-04-08 19:53:49 +02:00
Ilia Ross
26faad0d39 Fix regression in previous refactor
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-08 17:45:15 +02:00
Ilia Ross
886cf142db Fix indent (more) 2026-04-08 17:31:51 +02:00
Ilia Ross
d4439b445c Fix indent 2026-04-08 17:16:54 +02:00
Ilia Ross
5a336902f8 Add vars declarations 2026-04-08 17:09:16 +02:00
Jamie Cameron
19b0f187ba The [mysqld] section may be [mariadb]
https://github.com/webmin/webmin/issues/2650
2026-04-08 08:06:52 -07:00
Jamie Cameron
4a283d2180 Template description should be escaped 2026-04-08 07:56:12 -07:00
Jamie Cameron
670f33c872 Merge branch 'master' of github.com:webmin/webmin 2026-04-08 06:24:40 -07:00
Jamie Cameron
b5b65f06b7 Factor out function to get allowed paths 2026-04-08 06:24:32 -07:00
Ilia Ross
b02d797bc6 Fix the issue with disabled email for status report
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/virtualmin/virtualmin-gpl/issues/1202
2026-04-08 00:31:53 +02:00
Ilia Ross
b9fbf4b2c3 Fix status monitoring emails display 2026-04-08 00:31:14 +02:00
Jamie Cameron
ef1fb66954 Merge pull request #2657 from swelljoe/security-scan-core
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
typo s/actphost/acpthost/
2026-04-07 06:43:02 -07:00
Joe Cooper
316529c8ca typo s/actphost/acpthost/ 2026-04-06 22:27:52 -05:00
Jamie Cameron
d1e72c08a0 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-06 08:01:56 -07:00
Jamie Cameron
7ed4763f00 Don't declare a filesystem to be too small if we don't know how small it is
https://github.com/webmin/webmin/issues/2653
2026-04-06 08:01:19 -07:00
Ilia Ross
fe90fb2479 Fix process nice level and IO controls switchable
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2652

[no-build]
2026-04-03 16:43:19 +02:00
Jamie Cameron
e44a25191f Add support for headers with multiple values
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-02 07:31:51 -07:00
Jamie Cameron
3dbeb4e4db Don't trust proxy-provided SSL cert if it's flagged as not verified
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-01 18:17:02 -07:00
Jamie Cameron
7c5d4087fc Quote params by default 2026-04-01 18:07:19 -07:00
Ilia Ross
83e4fed616 Fix to correctly preserve full quoted action params in Fail2Ban jail editor #2647 2026-04-02 00:48:13 +02:00
Jamie Cameron
5b8dba4a5f Obsolete scripts that no longer need to exist
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-04-01 12:49:21 -07:00
Jamie Cameron
2404e1ddfc Permissions update
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-29 22:28:47 -07:00
Jamie Cameron
3a75f0f3f8 Sometimes ntfs is in lower case
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2635
2026-03-29 21:19:03 -07:00
Ilia Ross
d2b4fa89c5 Fix to match short GPG key IDs to full fingerprints
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/32?u=ilia
2026-03-29 15:20:10 +02:00
Ilia Ross
3a3b202a96 Add safe explicit TLS fallback for FTP backups for fsdump module
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/pull/2646
2026-03-26 12:02:24 +02:00
Ilia Ross
30f08f73fb Fix to support newer GnuPG passphrase handling
* Note: Use loopback pinentry for decrypt operation and retry decryption with the discovered secret key's stored passphrase on newer GnuPG versions

https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/26?u=ilia
2026-03-26 11:48:40 +02:00
Ilia Ross
e499b5b3a5 Fix to use loopback pinentry mode for GPG passphrase handling
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/19?u=ilia
2026-03-25 18:30:13 +02:00
Ilia Ross
443cf449eb Fix to use loopback pinentry for GPG decryption
https://forum.virtualmin.com/t/gpg-encryption-in-usermin/136729/19?u=ilia
2026-03-25 12:52:26 +02:00
Jamie Cameron
58d6308589 Properly check allowed directory paths
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-24 21:20:36 -07:00
Jamie Cameron
02ed8e8fbd New version bump
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-23 21:50:30 -07:00
Jamie Cameron
3a0dea1d2c Merge pull request #2648 from swelljoe/bind8-fix-warnings
Fix bind8 undefined warnings and sort/splice with non-numeric value
2026-03-23 20:27:08 -07:00
Joe Cooper
916d22b55b One more undefined 2026-03-23 22:22:31 -05:00
Joe Cooper
1f1a7e4562 Fix sort/splice bug 2026-03-23 21:54:18 -05:00
Joe Cooper
ac68a0be0c Fix bind8 undefined warnings 2026-03-23 21:36:29 -05:00
Ilia Ross
263cc142a6 Update changelog for 2.630
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-24 00:40:34 +02:00
Ilia Ross
19fdea395b Fix tab data escaping with proper JSON encoding
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
*Note: This is important if we want to support tags inside tab name, for example in case of showing a count of elements using HTML tag created with `ui_tag('tt')`
2026-03-21 21:00:10 +02:00
Ilia Ross
40f82d0df3 Revert "Fix to always avoid new lines inside the tag"
This reverts commit 39ab2c5f02.
2026-03-21 20:56:01 +02:00
Ilia Ross
39ab2c5f02 Fix to always avoid new lines inside the tag 2026-03-21 20:17:41 +02:00
Ilia Ross
f39a59bdce Fix to add module recommended packages
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-19 18:46:01 +02:00
Ilia Ross
a4846f5f32 Add an option to disable external programs from performing upgrades
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-17 20:11:36 +02:00
Ilia Ross
5558910722 Add API to activate and deactivate a service 2026-03-17 20:05:06 +02:00
Ilia Ross
bebd99d656 Add informational note about updates #2639
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-17 12:56:03 +02:00
Ilia Ross
bad0d2f821 Fix fields size
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
[no-build]
2026-03-16 11:22:13 +02:00
Jamie Cameron
4797852f6f Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-15 12:26:50 -07:00
Jamie Cameron
d467810076 Fix layout of from address field
https://github.com/webmin/webmin/issues/2644
2026-03-15 12:26:43 -07:00
Ilia Ross
6d1ec1a3e1 Fix missing tags
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-15 16:28:38 +02:00
Jamie Cameron
82ea895c81 No need for PHP prefix since all we're installing is PHP
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2641
2026-03-14 17:43:06 -07:00
Jamie Cameron
36e699eb29 Merge branch 'master' of github.com:webmin/webmin 2026-03-14 17:37:14 -07:00
Jamie Cameron
04e8df863a Better button name
https://github.com/webmin/webmin/issues/2643
2026-03-14 17:36:59 -07:00
Ilia Ross
96c2312349 Fix to improve the name of the downloaded backup file #2570
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-14 13:19:05 +02:00
Jamie Cameron
1d594e82f0 Sometimes ntfs is in lower case
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2635
2026-03-11 22:24:06 -07:00
Jamie Cameron
cbd96a4176 Make code more readable 2026-03-11 16:43:46 -07:00
Ilia Ross
ed17ade510 Fix not to leak 2FA auth secret to logs
https://github.com/webmin/webmin/pull/2638

[no-build]
2026-03-12 01:17:42 +02:00
Ilia Ross
dc63aa22a5 Fix to build HTML nicely
[no-build]
2026-03-12 01:06:49 +02:00
Ilia Ross
1b9b9ae21f Fix to show test form for two-factor only when enrolling for yourself
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-10 23:31:47 +02:00
Ilia Ross
f1d580de1b Add UI for testing two-factor after enrollment
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
aafecf0fb2
2026-03-10 22:33:02 +02:00
Ilia Ross
f0b9152ae5 Fix query monitor MariaDB driver handling 2026-03-10 18:05:59 +02:00
Ilia Ross
5862cde30f Fix cluster software remote eval escaping and target validation (#11) 2026-03-10 17:29:18 +02:00
Ilia Ross
2de16faafc Fix Solaris format module option and device command injection (#10) 2026-03-10 17:29:17 +02:00
Ilia Ross
098544473f Fix PostgreSQL user/group SQL quoting with shared helpers (#9) 2026-03-10 17:29:17 +02:00
Ilia Ross
2c82255179 Fix MySQL save handlers with parameterized SQL deletes (#8) 2026-03-10 17:29:17 +02:00
Ilia Ross
fe5cf97cef Fix query monitor driver eval with strict whitelist (#7) 2026-03-10 17:29:17 +02:00
Ilia Ross
01d650ca06 Fix fsdump stored extra option validation on save (#6) 2026-03-10 17:29:17 +02:00
Ilia Ross
e19dca6882 Fix fsdump restore command argument injection handling (#5) 2026-03-10 17:29:16 +02:00
Ilia Ross
3934ae3e73 Fix qmail alias file write path and tempfile safety (#4) 2026-03-10 17:29:16 +02:00
Ilia Ross
1a0aa44dba Fix IPsec up command injection via conn name (#3) 2026-03-10 17:29:16 +02:00
Ilia Ross
2c211e557e Fix runlevel change input validation and escaping (#2) 2026-03-10 17:29:16 +02:00
Ilia Ross
b3ec013fc9 Fix init start/stop command injection guard (#1) 2026-03-10 17:29:15 +02:00
Ilia Ross
b8481cc1e5 Add check for non public IP API 2026-03-10 13:49:03 +02:00
Ilia Ross
c0900ffaf8 Add quote literal escape API 2026-03-10 13:38:13 +02:00
Jamie Cameron
302f635651 Only fetch user list once per domain
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/webmin/issues/2634
2026-03-07 16:53:56 -08:00
Jamie Cameron
d5feb72572 Cleanup use of local
https://github.com/webmin/webmin/issues/2634
2026-03-07 13:32:00 -08:00
Jamie Cameron
cd7f867c09 Only load virtual-server module once
https://github.com/webmin/webmin/issues/2634
2026-03-07 13:29:37 -08:00
Jamie Cameron
16245144eb Cache block_size for each filesystem
https://github.com/webmin/webmin/issues/2634
2026-03-07 12:48:29 -08:00
Jamie Cameron
083b4c7826 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-05 20:46:29 -08:00
Jamie Cameron
019cc10b79 Use formal function parameters 2026-03-05 20:41:45 -08:00
Ilia Ross
5d860a6728 Fix to avoid showing a message if the user explicitly prefers tempdir
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-03-01 15:44:09 +02:00
Ilia Ross
2e4ec03670 Fix language files 2026-03-01 15:27:48 +02:00
Ilia Ross
b4984e495d Fix to ensure /tmp on tmpfs is displayed as separate mount 2026-03-01 15:15:17 +02:00
Ilia Ross
d7434c61a2 Fix to show post-save message about 2FA
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/no-qr-code-displayed-when-selectinc-totp/136703/5
2026-02-28 22:17:11 +02:00
Ilia Ross
f204480957 Fix formatting 2026-02-28 18:49:31 +02:00
Ilia Ross
04f1426f33 Add ability to get module edition 2026-02-28 18:23:13 +02:00
Ilia Ross
f10385417c Fix typo
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-27 12:09:25 +02:00
Jamie Cameron
a502eff346 Also warn about RAM disks
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-25 15:16:43 -08:00
Jamie Cameron
a3416dc830 Also warn about RAM disks 2026-02-25 15:15:20 -08:00
Ilia Ross
3354a0cc2f Fix missing class 2026-02-26 01:09:57 +02:00
Ilia Ross
2a7806be31 Fix to use proper params in parse_http_url sub
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
*Note: Additionally support ability not to normalize default ports
2026-02-25 12:34:24 +02:00
Ilia Ross
d4850c3aa3 Fix as the small limit is much smaller
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
(does it even make sense to have?)

https://forum.virtualmin.com/t/backup-and-restore-failures-no-space-left-on-device/136639/32?u=ilia
2026-02-25 01:40:02 +02:00
Ilia Ross
7cbe00ade2 Fix the message as it's already in the alert box
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-24 11:57:56 +02:00
Ilia Ross
540181ae22 Fix minimum size check for Webmin temp directory 2026-02-24 11:56:10 +02:00
Jamie Cameron
38cae2fae2 Add a warning if the temp files directory is less than 10 MB
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-23 21:13:03 -08:00
Jamie Cameron
9a14c437b8 Merge branch 'master' of github.com:webmin/webmin 2026-02-23 20:58:59 -08:00
Jamie Cameron
bd3fd5d49b Fix perl formatting 2026-02-23 20:58:55 -08:00
Ilia Ross
fb9f7ead7c Fix read_file_lines_as_user to use proper file name and params
https://forum.virtualmin.com/t/error-installing-wordpress-from-web-apps-after-update/136447/19?u=ilia
2026-02-24 01:24:21 +02:00
Jamie Cameron
92ac52893e Revert back to using /tmp/.webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-21 15:34:24 -08:00
Ilia Ross
2397653d55 Fix IPv6 hostname matching for alwaysresolve access rules
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
* Note: Fix Miniserv IPv6 hostname resolution and matching used by access control when `alwaysresolve` is enabled:
  1. Correct `to_ip6address()` success handling (before getaddrinfo result was interpreted backwards)
  2. In `ip_match()`, resolve hostnames with `to_ip6address()` for IPv6 clients instead of IPv4-only `to_ipaddress()`
  3. Canonicalize IPv6 addresses before reverse and forward verification to avoid format-based mismatches.
  4. Mirror the IPv6 logic change in "webmin/webmin-lib.pl"

https://forum.virtualmin.com/t/webmin-access-control-for-domain-names-with-ipv6/136661?u=ilia
2026-02-21 13:30:08 +02:00
Ilia Ross
209a2cbbc3 Fix to use /var/tmpas default temp dir instead of /var/cache (not rw by user)
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-20 16:09:30 +02:00
Ilia Ross
29c2c6f59d Fix to prefer /var/cache or /var/tmp over /tmp for default temp directory 2026-02-20 15:35:47 +02:00
Ilia Ross
c89dc4996f Fix to de-hardcode default temp directory path
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-20 15:16:01 +02:00
Ilia Ross
bfc1f10b38 Fix to avoid leaking to neighboring property when size is unset
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-19 23:22:48 +02:00
Ilia Ross
56a1c323c8 Fix def min width 2026-02-19 23:16:41 +02:00
Jamie Cameron
f7384bbf05 Properly propogate error messages
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-19 11:33:20 -08:00
Ilia Ross
9cd60f4741 Fix to disable directory listing by default
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-18 16:24:58 +02:00
Ilia Ross
f778af84a0 Fix create_launchd_agent to support optional load parameter
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/authentic-theme/issues/1729#issuecomment-3899950457
2026-02-16 20:15:52 +02:00
Ilia Ross
2eb2be2318 Add support for updating launchd agents with start init wrapper
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://github.com/webmin/authentic-theme/issues/1729
2026-02-13 17:44:07 +02:00
Jamie Cameron
38352f5c01 Deprecate the unused template params support in hlink.cgi
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-11 16:16:33 -08:00
Ilia Ross
07a11f7de6 Fix to use quotemeta to prevent shell injection in Useradmin module
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-11 13:03:27 +02:00
Ilia Ross
8b76f2ffc8 Fix OS list field separations to do correctly 2026-02-11 11:49:02 +02:00
Jamie Cameron
6d014e31cb Merge pull request #2628 from pbobbenb/macOS-detection
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Added missing macOS versions.
2026-02-10 18:12:11 -08:00
Pär Boberg
3b05ce756d Added missing macOS versions. 2026-02-11 00:06:07 +01:00
Ilia Ross
7f322a5df6 Fix to use quotemeta to prevent shell injection in Logviewer module
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-11 01:05:36 +02:00
Ilia Ross
c47047953b Fix to use quotemeta to prevent shell injection in Software module 2026-02-11 00:53:29 +02:00
Ilia Ross
f30560d61b Fix to use quotemeta to prevent shell injection in Cron module 2026-02-10 22:09:07 +02:00
Ilia Ross
e13123bed1 Fix to use quotemeta to prevent shell injection in Proc module 2026-02-10 21:40:15 +02:00
Ilia Ross
821548354d Fix file opening syntax 2026-02-10 20:34:51 +02:00
Jamie Cameron
3a1ea4682d Fix merge conflict 2026-02-10 10:24:58 -08:00
Jamie Cameron
3713ee01b8 The server_root function doesn't need the global config as a parameter 2026-02-10 10:21:22 -08:00
Ilia Ross
de87e037d4 Fix to use quotemeta to prevent shell injection in FSdump module 2026-02-10 19:58:24 +02:00
Ilia Ross
e805f95b48 Fix regression
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-10 18:59:02 +02:00
Ilia Ross
b782a124b5 Fix to use quotemeta to prevent shell injection in Quota module 2026-02-10 18:56:37 +02:00
Ilia Ross
c85d04cc74 Fix to use proper validation before writing files 2026-02-10 16:23:58 +02:00
Ilia Ross
a6bd5c6ebc Fix to use quotemeta to prevent shell injection in Apache module 2026-02-10 15:57:07 +02:00
Ilia Ross
9fd37b7404 Fix to use quotemeta to prevent shell injection in BIND module 2026-02-10 15:40:29 +02:00
Ilia Ross
ac9456b368 Fix to use quotemeta to prevent shell injection in fetchmail module
Ref.: 50a2460d-441a-4bc6 (VULN-003)
2026-02-10 14:45:20 +02:00
Ilia Ross
399d7a8651 Fix to use quotemeta to prevent shell injection in fdisk module
Ref.: 796677885d (VULN-001)
2026-02-10 14:05:16 +02:00
Ilia Ross
c87712ef4e Fix to use quotemeta to prevent shell injection in usermin module
Ref.: a8417099-d3bc-468a (VULN-004)
2026-02-10 13:21:56 +02:00
Ilia Ross
c47b63bfcf Fix to use quotemeta to prevent shell injection in mount module
Ref.: 97bf3c03-fbe3-4ee0
2026-02-10 12:57:59 +02:00
Jamie Cameron
3a86d961ce Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-09 10:57:04 -08:00
Jamie Cameron
402b21abac Fix permissions 2026-02-09 10:56:52 -08:00
Jamie Cameron
0816c0a71e Revert "Add extra protection against packets somehow arriving before handshake is called"
This reverts commit d9c651d06d.
2026-02-09 10:56:23 -08:00
Ilia Ross
a38114e623 Fix to use flags unconditionally as supported by all modern distros
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-02-08 16:20:29 +02:00
Ilia Ross
a655f875cf Fix log filtering logic to work with new regex flag correctly 2026-02-08 16:16:57 +02:00
Ilia Ross
79b5b307ed Add regex filter option to log viewer 2026-02-08 15:41:01 +02:00
Ilia Ross
5a3b0cfd2d Add context lines option for log viewer filter
https://github.com/virtualmin/virtualmin-gpl/issues/1174
2026-02-08 14:31:16 +02:00
Ilia Ross
fa32009fbb Merge pull request #2625 from karmantyu/master
Improved disk detection, smart status, partition mounting, added labe…
2026-02-08 11:11:26 +02:00
karmantyu
a9f4fdc8ca Corrected escape, removed broad, unanchored regex checks . 2026-02-08 08:34:32 +01:00
karmantyu
b593501cff Some fixes.
All $err type error messages in HTML are safely escaped now.
URL-encoding in links:
I have implemented urlize() in all places where user input ($in{'device'}, $in{'slice'}, $in{'part'}) was included in the URL (footer/redirect/other link), e.g. edit_slice.cgi?device=...&slice=....
Affected files include: create_part.cgi, create_slice.cgi, delete_part.cgi, delete_slice.cgi, change_slice_label.cgi, part_form.cgi, slice_form.cgi, edit_slice.cgi, edit_part.cgi, fsck.cgi, newfs.cgi, newfs_form.cgi, save_part.cgi, save_slice.cgi, save_slice_label.cgi, zfs_create.cgi, zvol_create.cgi.
2026-02-07 19:43:08 +01:00
karmantyu
107a2e42f4 Merge branch 'webmin:master' into master 2026-02-07 19:04:42 +01:00
Jamie Cameron
3572049284 Handle error listing zones more cleanly
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
https://forum.virtualmin.com/t/how-to-configure-secondary-dns/136557
2026-02-06 21:08:06 -08:00
karmantyu
d9be1b956f bsdfdisk-lib.pl patched to enumerate nda* devices
Related to the NVMe issue: I patched bsdfdisk-lib.pl to enumerate nda* devices (in addition to nvd*), since the reporter uses the nda driver.
2026-02-06 18:38:10 +01:00
karmantyu
b2f54c36ca Some tidy up and numeric validation + quote_path. 2026-02-04 08:42:44 +01:00
karmantyu
cbc96170c4 Delete save_slice.cgi 2026-02-04 08:42:16 +01:00
karmantyu
9d01f3cd9e Delete bsdfdisk-lib.pl 2026-02-04 08:41:34 +01:00
karmantyu
ca7c57b181 Some tidy up and numeric validation + quote_path. 2026-02-04 08:39:11 +01:00
Joe Cooper
a1091556db Add intro.html 2026-02-02 23:08:05 -06:00
Joe Cooper
48269733b1 Add support for sets 2026-02-02 20:52:30 -06:00
Joe Cooper
9145c23126 Don't use old function calling semantics in new code 2026-02-02 19:53:40 -06:00
Joe Cooper
4368e00250 Some perlcritic fixes 2026-02-02 19:45:04 -06:00
Joe Cooper
31d4b6dfd6 Re-order rules support 2026-02-02 18:07:42 -06:00
karmantyu
859580a224 Tidy up. 2026-02-02 07:50:07 +01:00
Joe Cooper
163dd04175 Chain CRUD functionality 2026-02-01 19:03:20 -06:00
Joe Cooper
3f96fb8adb Add tooltips to edit_rule, hide advanced options by default 2026-02-01 18:36:13 -06:00
karmantyu
30b2e8b6d4 Security and other minor changes. 2026-02-01 11:39:57 +01:00
Joe Cooper
8242714b99 Update raw rule in realtime, allow editing directly 2026-01-31 18:01:23 -06:00
Joe Cooper
179ddf751b Expand parser, cover more kinds of rules 2026-01-31 17:00:57 -06:00
karmantyu
63fd68b2f9 proper escape the dataset name 2026-01-31 21:16:53 +01:00
karmantyu
8402db53d5 Improved disk detection, smart status, partition mounting, added label handling, zfs filesystem/volume creation. 2026-01-31 20:55:00 +01:00
Joe Cooper
e92fc730ee Make selecting table work without a submit button 2026-01-31 13:16:07 -06:00
Joe Cooper
d546116ab7 Add/delete table, and select table 2026-01-31 02:21:33 -06:00
Jamie Cameron
736c320a60 Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-01-29 20:02:47 -08:00
Jamie Cameron
0ecbb04e00 Treat fuseblk as a local disk filesystem
https://github.com/webmin/webmin/issues/2624
2026-01-29 20:00:34 -08:00
Ilia Ross
2dfa6cfc1b Merge branch 'master' of github.com:webmin/webmin
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-01-27 02:24:59 +02:00
Ilia Ross
e6184a0036 Fix to only check for uniqueness 2026-01-26 22:55:18 +02:00
Joe Cooper
0d70782330 Always allow Webmin/ssh ports on setup 2026-01-22 20:45:07 -06:00
Super User
d89f1ee1de Initial commit 2026-01-22 00:23:17 -06:00
1701 changed files with 88637 additions and 10856 deletions

15
.github/workflows/close-inactive.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Close inactive
on:
schedule:
- cron: "0 12 * * *"
workflow_dispatch:
permissions:
contents: read
issues: write
pull-requests: write
jobs:
close-inactive:
uses: webmin/webmin-ci-cd/.github/workflows/close-inactive.yml@main

19
.github/workflows/tests.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Tests
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
prove:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Perl::Critic
run: sudo apt-get update && sudo apt-get install -y libperl-critic-perl
- name: prove -lr
run: prove -lr

View File

@@ -1,4 +1,4 @@
name: "webmin.dev: webmin/webmin"
name: Package and upload artifacts
on:
push:
@@ -25,3 +25,5 @@ jobs:
PRERELEASE_UPLOAD_SSH_DIR: ${{ secrets.PRERELEASE_UPLOAD_SSH_DIR }}
DEV_SSH_PRV_KEY: ${{ secrets.DEV_SSH_PRV_KEY }}
ALL_GPG_PH2: ${{ secrets.ALL_GPG_PH2 }}
CODE_REVIEW_API_KEY: ${{ secrets.CODE_REVIEW_API_KEY }}
CODE_REVIEW_SMTP_PASSWORD: ${{ secrets.CODE_REVIEW_SMTP_PASSWORD }}

1
.gitignore vendored
View File

@@ -22,3 +22,4 @@ tarballs/
minimal/
.DS_Store
.vscode/settings.json
debug.cgi

6
.perlcriticrc Normal file
View File

@@ -0,0 +1,6 @@
severity = 5
# Octal file permission literals (0700, 0640, etc.) are the standard Perl
# idiom for chmod/mkdir/permission helpers throughout this codebase. The
# policy flags chmod 0700 itself, so it is too coarse for our use.
[-ValuesAndExpressions::ProhibitLeadingZeros]

View File

@@ -1,5 +1,109 @@
## Changelog
#### 2.651 (June 28, 2026)
* Fix Certbot-backed certificate requests and renewals to correctly parse PEM paths after issuance
* Fix live activation of Linux bond interfaces [#2777](https://github.com/webmin/webmin/pull/2777)
* Update the Authentic theme to the latest version with various improvements and fixes:
- Fix search-result all-items delete in File Manager
- Fix search-result delete ordering in File Manager
- Fix to speed up search-result deletion cleanup in File Manager
#### 2.650 (June 25, 2026)
* Add new Systemd Services and Units module
* Add new GRUB 2 Boot Loader module
* Add new Kea DHCP Server module
* Add WebSocket proxy support to the Webmin Servers Index module
* Add basic Alpine Linux support
* Add IP-based Let's Encrypt certificate support with Certbot 5.3
* Add editable SSH public keys for newly added Unix users in Users and Groups module
* Add improvements to custom Webmin temporary directory handling
* Add quick service and port forwarding controls to the nftables module
* Add optional pre- and post-scripts for scheduled package updates
* Add option to control when scheduled package update email is sent
* Add per-user RPC/API-only access option to the Webmin Users module
* Add Apache 2.4 MPM process limit directives [#1821](https://github.com/webmin/webmin/issues/1821)
* Add dhcpcd network backend for Debian and Raspberry Pi OS [#1607](https://github.com/webmin/webmin/issues/1607)
* Add hardware RAID passthrough devices config in the SMART Status module [#1704](https://github.com/webmin/webmin/issues/1704)
* Update Xterm.js to fix Control-C handling on iPadOS/Safari terminals
* Update Webmin systemd service unit to run without forking
* Fix IPv6 CIDR access control matching [#1570](https://github.com/webmin/webmin/issues/1570)
* Fix Bootup and Shutdown module to show only services and not all units on systemd systems
* Fix Let's Encrypt renewal scheduling to count from the last successful request
* Fix NetworkManager detection on Debian and IPv6 DNS nameserver saving
* Fix Dovecot configuration file handling when saving extra configs
* Fix mailbox listing to skip unusable Maildir entries and remove stale deleted or moved entries
* Fix Postfix module labels to identify virtual alias maps instead of virtual mailbox domains #1541
* Fix Apache module to hide disabled default virtual hosts from the active server list
* Fix Netplan DNS saving to preserve YAML structure
* Fix BIND DNS handling of underscores, trailing dots, and mass record length checks
* Fix MariaDB user creation when using auth plugin syntax
* Fix PHP-FPM monitor on EL systems when using `/etc/php.ini` as the config file
* Fix RPC-only accounts to block browser/module access before module ACL checks
* Fix reflected XSS in Webmin status messages
* Fix path validation in File Manager, package delete helpers, and Apache virtual host files
* Fix authentication state handling for SSL certificate logins and proxied keep-alive requests
* Update session handling to improve security, which will require users to re-authenticate after upgrading
* Update the Authentic theme to the latest version with various improvements and fixes:
- Add zooming to stats history graphs by holding shift and scrolling in the dashboard
- Add support for saving live stats history for up to 24 hours without performance impact
- Add better support for the new Nginx, nftables, and upcoming systemd, Kea-DHCP, and GRUB 2 Webmin modules
- Add ability to always show available dashboard panels in theme configuration
- Add support for live stats and terminal WebSocket connections through Webmin Servers Index proxy links
- Fix proxying when Webmin is accessed with a webprefix using Webmin Servers Index module
- Fix theme UI helpers to escape generated markup more safely
- Fix iOS terminal viewport sizing
- Fix editor save handling, clean-state indication and dirty reload guard
- Fix popover positioning, z-index and border color for help bubbles
- Fix the active product switch border in the navigation menu for the dark palette
- Fix to validate password reset return URLs
#### 2.641 (May 10, 2026)
* Fixed a bug when editing monitors in the System and Server Status module
* Fix Fail2Ban default jail options
* Added support for trusted proxy IP addresses
#### 2.640 (May 4, 2026)
* Add new nftables module with profiles, saved tables, and chains/sets management
* Add new Nginx module with look and feel matching the Apache module
* Add option to hide sensitive values (like passwords or tokens) from Webmin's request logs
* Add custom ACME server support for Webmin SSL renewal
* Add support for the latest MariaDB on Ubuntu 26.04
* Add multi-statement SQL query support when executing inline in MySQL/MariaDB module
* Add support for ext4 hidden inode quota mode
* Add used space and usage percentage reporting for ZFS in the dashboard
* Add mass enable and disable buttons for status monitors in the System and Server Status module
* Update tiny ACME client to the latest version
* Update DHCP default config for openSUSE 16 [#2678](https://github.com/webmin/webmin/issues/2678)
* Fix to prevent bypassing two-factor authentication in RPC requests
* Fix session cookies to use safer defaults
* Fix handling of connections coming through a reverse proxy
* Fix unsafe mailbox attachment handling in Mailbox module
* Fix unsafe decoding of Outlook `winmail.dat` attachments
* Fix Certbot standalone port conflicts
* Fix to correctly preserve full quoted action parameters in the Fail2Ban jail editor [#2647](https://github.com/webmin/webmin/issues/2647)
* Fix Fail2Ban default jail options to preserve required timing defaults when saving
* Fix ZFS to fall back to `df` when disk space cannot be computed from `zpool`
* Fix to allow toggling process priority and I/O controls on or off
* Fix issue where disabled email notifications were still being processed
* Update Authentic theme to the latest version with various improvements and fixes:
- Upgrade stats history graphs from laggy SVG to a blazing-fast canvas renderer
- Add option to control corner roundness for the menu, content area and right-side slider
- Change the content area to use rounded corners and a margin by default
- Fix message of the day display in login page correctly [webmin#2555](https://github.com/webmin/webmin/issues/2685)
- Fix tooltip visibility in dark palette
- Fix session login button spinner
- Fix various button styling issues (active state, tiny buttons, airy buttons, stack position)
#### 2.630 (March 24, 2026)
* Add improvements to user input validation across all modules
* Update Authentic theme to the latest version with various improvements and fixes:
- Add a new airy button style to the light palette to match the dark one
- Fix to optimize stats server to reduce WebSocket memory usage
- Fix the real-time follow indicator when viewing the journal
- Fix regex-based match highlighting when viewing the journal
- Fix mail compose panel sizing in HTML mode on low-DPR screens
- Fix display of the 2FA QR code in the dark palette
#### 2.621 (January 25, 2026)
* Fix to prevent NAT from dropping idle RPC sessions during long transfers
* Fix to improve the message when socket authentication is used in the MySQL/MariaDB module
@@ -532,7 +636,7 @@ This release adds automatic translations for all languages in UTF-8, updates the
This release updates the built-in Let's Encrypt client, adds support for creating "safe-mode" Webmin users, support for CAA records in the BIND module, and the ability to search Postfix maps. It also updates the Authentic theme to the latest version, which includes numerous improvements to the File Manager and overall UI.
#### Version 1.930 (August 18, 2019)
These updates fix a [security vulnerability](http://webmin.com/security.html) and should be installed IMMEDIATELY by all users. Although it is not exploitable in a Webmin install with the default configuration, upgrading is strongly recommended.
These updates fix a [security vulnerability](https://webmin.com/security/) and should be installed IMMEDIATELY by all users. Although it is not exploitable in a Webmin install with the default configuration, upgrading is strongly recommended.
#### Version 1.920 (July 4, 2019)
This update includes the latest theme version, translation updates, the ability to disable hosts file entries, easier monitoring of bootup actions, and a bunch of bugfixes.
@@ -865,4 +969,3 @@ This updated includes the latest Authentic theme, a new IPv6 Firewall module for
#### Version 1.140
* Fixed a security hole that allowed any user to view the configuration of any module, even those that they should not have access to.
* Fixed a security hole that could allow an attacker to lock valid users by sending a bogus username or password.

View File

@@ -1,7 +1,7 @@
## 内容
* [更新日志](https://github.com/webmin/webmin/blob/master/CHANGELOG.md)
* [关于](#关于)
* [安装](#安装)[<img src="https://github.com/webmin-devel/webmin/blob/master/media/download-23x14-stable.png?raw=true" title="稳定版">](http://webmin.com/download.html)[<img src="https://github.com/webmin-devel/webmin/blob/master/media/download-23x14-devel.png?raw=true" title="Development Versions">](http://webmin.com/devel.html)
* [安装](#安装)[<img src="https://github.com/webmin-devel/webmin/blob/master/media/download-23x14-stable.png?raw=true" title="稳定版">](https://webmin.com/download.html)[<img src="https://github.com/webmin-devel/webmin/blob/master/media/download-23x14-devel.png?raw=true" title="Development Versions">](https://webmin.com/devel.html)
* [文档](#文档)
* [致谢](#致谢)
* [许可](#许可)
@@ -26,11 +26,11 @@ Perl 5.10 或更高。
## 安装
Webmin 可以两种方法安装:
1. 下载一个预编译包可用于不同的发行版CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris 和 [其他发行版](http://www.webmin.com/support.html))。[下载页面直达车](http://webmin.com/download.html);
1. 下载一个预编译包可用于不同的发行版CentOS, Fedora, SuSE, Mandriva, Debian, Ubuntu, Solaris 和 [其他发行版](https://webmin.com/support.html))。[下载页面直达车](https://webmin.com/download.html);
<kbd>注:非常建议[在你的系统添加源](https://doxfer.webmin.com/Webmin/Installation),这样可以自动更新</kbd>
2. 下载并解压[源码](https://prdownloads.sourceforge.net/webadmin/webmin-1.996.tar.gz)然后运行[_setup.sh_](http://www.webmin.com/tgz.html) 脚本,无需任何选项,也就是说会直接安装到当前目录。或者使用命令行参数,例如目标目录。
<kbd>注:如果你正在安装 Webmin [到Windows](http://www.webmin.com/windows.html) 系统上,你必须运行 `perl setup.pl` 命令。Windows 版能否正常运行取决于许多程序,和可能不属于标准发行版的模块。你需要 _process.exe_ 命令, _sc.exe_ 命令,以及 _Win32::Daemon_ Perl 模块。</kbd>
2. 下载并解压[源码](https://prdownloads.sourceforge.net/webadmin/webmin-1.996.tar.gz)然后运行[_setup.sh_](https://webmin.com/tgz.html) 脚本,无需任何选项,也就是说会直接安装到当前目录。或者使用命令行参数,例如目标目录。
<kbd>注:如果你正在安装 Webmin [到Windows](https://webmin.com/windows.html) 系统上,你必须运行 `perl setup.pl` 命令。Windows 版能否正常运行取决于许多程序,和可能不属于标准发行版的模块。你需要 _process.exe_ 命令, _sc.exe_ 命令,以及 _Win32::Daemon_ Perl 模块。</kbd>
## 文档
完整的 Webmin 还有它所有模块的详细配置都在[维基页面](https://doxfer.webmin.com/Webmin/Main_Page).
@@ -39,7 +39,7 @@ Webmin 可以两种方法安装:
### 首席开发者
* [Jamie Cameron](http://www.webmin.com/about.html) [![](https://github.com/webmin-devel/webmin/blob/master/media/linkedin-15x15.png?raw=true)](https://www.linkedin.com/in/jamiecameron2)
* [Jamie Cameron](https://webmin.com/about.html) [![](https://github.com/webmin-devel/webmin/blob/master/media/linkedin-15x15.png?raw=true)](https://www.linkedin.com/in/jamiecameron2)
### 贡献者

View File

@@ -45,7 +45,7 @@ For detailed installation instructions check our guide on [webmin.com/download](
### Lead developer
* [Jamie Cameron](https://www.webmin.com/about.html) [![](https://github.com/webmin-devel/webmin/blob/master/media/linkedin-15x15.png?raw=true)](https://www.linkedin.com/in/jamiecameron2)
* [Jamie Cameron](https://webmin.com/about.html) [![](https://github.com/webmin-devel/webmin/blob/master/media/linkedin-15x15.png?raw=true)](https://www.linkedin.com/in/jamiecameron2)
### Developers
* [Ilia Rostovtsev](https://github.com/iliaross)

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -11,7 +11,7 @@ Library for editing webmin users, passwords and access rights.
=cut
BEGIN { push(@INC, ".."); };
BEGIN { push(@INC, ".."); }; ## no critic
use strict;
use warnings;
no warnings 'redefine';
@@ -92,7 +92,6 @@ while(my $l = <$fh>) {
$user{'locale'} = $gconfig{"locale_$user[0]"};
$user{'dateformat'} = $gconfig{"dateformat_$user[0]"};
$user{'notabs'} = $gconfig{"notabs_$user[0]"};
$user{'rbacdeny'} = $gconfig{"rbacdeny_$user[0]"};
if ($gconfig{"theme_$user[0]"}) {
($user{'theme'}, $user{'overlay'}) =
split(/\s+/, $gconfig{"theme_$user[0]"});
@@ -353,7 +352,8 @@ each of which is a hash reference in the same format as their module.info files.
sub list_module_infos
{
my @mods = grep { &check_os_support($_) } &get_all_module_infos();
return sort { $a->{'desc'} cmp $b->{'desc'} } @mods;
my @sorted = sort { $a->{'desc'} cmp $b->{'desc'} } @mods;
return @sorted;
}
=head2 create_user(&details, [clone])
@@ -501,8 +501,6 @@ else {
$gconfig{"lang_".$user->{'name'}} = $user->{'lang'} if ($user->{'lang'});
delete($gconfig{"notabs_".$user->{'name'}});
$gconfig{"notabs_".$user->{'name'}} = $user->{'notabs'} if ($user->{'notabs'});
delete($gconfig{"rbacdeny_".$user->{'name'}});
$gconfig{"rbacdeny_".$user->{'name'}} = $user->{'rbacdeny'} if ($user->{'rbacdeny'});
delete($gconfig{"ownmods_".$user->{'name'}});
$gconfig{"ownmods_".$user->{'name'}} = join(" ", @{$user->{'ownmods'}})
if ($user->{'ownmods'} && @{$user->{'ownmods'}});
@@ -722,9 +720,6 @@ else {
delete($gconfig{"notabs_".$username});
$gconfig{"notabs_".$user->{'name'}} = $user->{'notabs'}
if ($user->{'notabs'});
delete($gconfig{"rbacdeny_".$username});
$gconfig{"rbacdeny_".$user->{'name'}} = $user->{'rbacdeny'}
if ($user->{'rbacdeny'});
delete($gconfig{"ownmods_".$username});
$gconfig{"ownmods_".$user->{'name'}} = join(" ", @{$user->{'ownmods'}})
if ($user->{'ownmods'} && @{$user->{'ownmods'}});
@@ -1337,12 +1332,12 @@ my ($miniserv) = @_;
my $sfile = $miniserv->{'sessiondb'} ? $miniserv->{'sessiondb'} :
$miniserv->{'pidfile'} =~ /^(.*)\/[^\/]+$/ ? "$1/sessiondb"
: return;
eval "use SDBM_File";
eval { require SDBM_File; SDBM_File->import; 1 };
dbmopen(%sessiondb, $sfile, 0700);
eval { $sessiondb{'1111111111'} = 'foo bar' };
if ($@) {
dbmclose(%sessiondb);
eval "use NDBM_File";
eval { require NDBM_File; NDBM_File->import; 1 };
dbmopen(%sessiondb, $sfile, 0700);
}
else {
@@ -1428,16 +1423,158 @@ Creates a new session ID that's already logged in as the given user
sub create_session_user
{
my ($miniserv, $username, $lifetime) = @_;
return undef if (&is_readonly_mode());
return if (&is_readonly_mode());
&open_session_db($miniserv);
my $sid = &generate_random_session_id();
return undef if (!$sid);
return if (!$sid);
my $t = time();
$sessiondb{$sid} = "$username $t 127.0.0.1".($lifetime ? " ".$lifetime : "");
dbmclose(%sessiondb);
return $sid;
}
=head2 set_module_access(&modules, enabled, [&users-groups])
Grants or revokes Webmin module access for users and groups. The modules
parameter must be an array ref of module names. The enabled flag should be
1 to grant access, or 0 to revoke access. If the users-groups parameter is
not given, all users and groups are updated. Otherwise, it must be an array
ref of usernames and group names. Group names may be prefixed with @ to
target only a group.
Returns the number of directly updated user and group records.
=cut
sub set_module_access
{
my ($mods, $enabled, $usersgroups) = @_;
$mods ||= [];
return 0 if (!@$mods);
my $set_module_access_list = sub {
my ($obj, $key, $addmods) = @_;
$addmods ||= $mods;
my @old = @{$obj->{$key} || []};
my @new;
if ($enabled) {
@new = &unique(@old, @$addmods);
}
else {
my %remove = map { $_, 1 } @$mods;
@new = grep { !$remove{$_} } @old;
}
return 0 if (join("\0", @old) eq join("\0", @new));
$obj->{$key} = \@new;
return 1;
};
my $own_module_updates = sub {
my ($obj, $inherited) = @_;
return $mods if (!$enabled);
return [] if (!@{$obj->{'ownmods'} || []} && !@$inherited);
return [ grep { &indexof($_, @$inherited) < 0 } @$mods ];
};
my @users = &list_users();
my @groups = &list_groups();
my $all = !defined($usersgroups);
my (%target_user, %target_group);
if (!$all) {
foreach my $ug (@$usersgroups) {
if ($ug =~ /^\@(.*)$/) {
$target_group{$1} = 1;
}
else {
$target_user{$ug} = 1;
$target_group{$ug} = 1;
}
}
}
my $changed = 0;
my (%user_group, %group_parent);
foreach my $g (@groups) {
foreach my $m (@{$g->{'members'} || []}) {
if ($m =~ /^\@(.*)$/) {
$group_parent{$1} = $g;
}
else {
$user_group{$m} = $g;
}
}
}
my (@ordered_groups, %ordered_group, %ordering_group);
my $add_ordered_group;
$add_ordered_group = sub {
my ($g) = @_;
return if (!$g || $ordered_group{$g->{'name'}});
return if ($ordering_group{$g->{'name'}}++);
$add_ordered_group->($group_parent{$g->{'name'}});
delete($ordering_group{$g->{'name'}});
push(@ordered_groups, $g);
$ordered_group{$g->{'name'}}++;
};
foreach my $g (@groups) {
$add_ordered_group->($g);
}
# Update groups first, so member users and sub-groups inherit the new set
foreach my $g (@ordered_groups) {
next if (!$all && !$target_group{$g->{'name'}});
my $gchanged = 0;
my $parent = $group_parent{$g->{'name'}};
my $ownmods = $own_module_updates->(
$g, [ @{$parent ? $parent->{'modules'} || [] : []} ]);
$gchanged += $set_module_access_list->($g, "modules");
$gchanged += $set_module_access_list->($g, "ownmods", $ownmods);
if ($gchanged) {
&modify_group($g->{'name'}, $g);
&update_members(\@users, \@groups, $g->{'modules'},
$g->{'members'});
$changed++;
}
}
# Update directly targeted users
foreach my $u (@users) {
next if (!$all && !$target_user{$u->{'name'}});
my $uchanged = 0;
my $group = $user_group{$u->{'name'}};
my $ownmods = $own_module_updates->(
$u, [ @{$group ? $group->{'modules'} || [] : []} ]);
$uchanged += $set_module_access_list->($u, "modules");
$uchanged += $set_module_access_list->($u, "ownmods", $ownmods);
if ($uchanged) {
&modify_user($u->{'name'}, $u);
$changed++;
}
}
if ($changed) {
undef(%main::acl_hash_cache);
undef(%main::acl_array_cache);
}
return $changed;
}
=head2 enable_module_access(&modules, [&users-groups])
Grants users and groups access to one or more modules. This is a wrapper
around set_module_access.
=cut
sub enable_module_access
{
return &set_module_access($_[0], 1, $_[1]);
}
=head2 disable_module_access(&modules, [&users-groups])
Revokes users and groups access to one or more modules. This is a wrapper
around set_module_access.
=cut
sub disable_module_access
{
return &set_module_access($_[0], 0, $_[1]);
}
=head2 update_members(&allusers, &allgroups, &modules, &members)
Update the modules for members users and groups of some group. The parameters
@@ -1699,7 +1836,7 @@ elsif (&has_command("ssleay")) {
return &has_command("ssleay");
}
else {
return undef;
return;
}
}
@@ -1815,6 +1952,7 @@ foreach my $g (&list_groups()) {
return $g;
}
}
return;
}
=head2 check_password_restrictions(username, password)
@@ -1859,7 +1997,7 @@ if ($miniserv{'pass_oldblock'} && $user) {
last if ($c++ > $miniserv{'pass_oldblock'});
}
}
return undef;
return;
}
=head2 hash_session_id(sid)
@@ -1896,11 +2034,11 @@ my $use_md5 = &md5_perl_module();
$use_md5 || &error("No Perl MD5 hashing module found!");
# Add the password
my $ctx = eval "new $use_md5";
my $ctx = $use_md5->new;
$ctx->add($passwd);
# Add some more stuff from the hash of the password and salt
my $ctx1 = eval "new $use_md5";
my $ctx1 = $use_md5->new;
$ctx1->add($passwd);
$ctx1->add($passwd);
my $final = $ctx1->digest();
@@ -1949,12 +2087,12 @@ Returns a Perl module for MD5 hashing, or undef if none.
sub md5_perl_module
{
my $use_md5;
eval "use MD5";
eval { require MD5; MD5->import; 1 };
if (!$@) {
$use_md5 = "MD5";
}
else {
eval "use Digest::MD5";
eval { require Digest::MD5; Digest::MD5->import; 1 };
if (!$@) {
$use_md5 = "Digest::MD5";
}
@@ -2111,16 +2249,16 @@ my ($str, $notablecheck) = @_;
my ($proto, $user, $pass, $host, $prefix, $args) = &split_userdb_string($str);
if ($proto eq "mysql" || $proto eq "postgresql") {
# Load DBI driver
eval 'use DBI;';
eval { require DBI; DBI->import; 1 };
return &text('sql_emod', 'DBI') if ($@);
if ($proto eq "mysql") {
eval 'use DBD::mysql;';
eval { require DBD::mysql; DBD::mysql->import; 1 };
return &text('sql_emod', 'DBD::mysql') if ($@);
my $drh = DBI->install_driver("mysql");
return $text{'sql_emysqldriver'} if (!$drh);
}
else {
eval 'use DBD::Pg;';
eval { require DBD::Pg; DBD::Pg->import; 1 };
return &text('sql_emod', 'DBD::Pg') if ($@);
my $drh = DBI->install_driver("Pg");
return $text{'sql_epostgresqldriver'} if (!$drh);
@@ -2152,11 +2290,11 @@ if ($proto eq "mysql" || $proto eq "postgresql") {
}
}
&disconnect_userdb($str, $dbh);
return undef;
return;
}
elsif ($proto eq "ldap") {
# Load LDAP module
eval 'use Net::LDAP;';
eval { require Net::LDAP; Net::LDAP->import; 1 };
return &text('sql_emod', 'Net::LDAP') if ($@);
# Try to connect
@@ -2190,7 +2328,7 @@ elsif ($proto eq "ldap") {
$found || return &text('sql_eldapdn', $prefix);
}
&disconnect_userdb($str, $dbh);
return undef;
return;
}
else {
return "Unknown user database type $proto";
@@ -2284,8 +2422,8 @@ if (!$miniserv) {
$miniserv = { };
&get_miniserv_config($miniserv);
}
foreach $a (split(/\s+/, $miniserv->{'anonymous'})) {
if ($a =~ /^([^=]+)=(\S+)$/ && $2 eq $user) {
foreach my $tok (split(/\s+/, $miniserv->{'anonymous'})) {
if ($tok =~ /^([^=]+)=(\S+)$/ && $2 eq $user) {
push(@rv, $1);
}
}
@@ -2299,7 +2437,7 @@ sub get_safe_acl
my ($m) = @_;
my $mdir = &module_root_directory($m);
my %rv;
&read_file_cached("$mdir/safeacl", \%rv) || return undef;
&read_file_cached("$mdir/safeacl", \%rv) || return;
return \%rv;
}
@@ -2313,17 +2451,19 @@ sub generate_random_session_id
my $sid;
# Try /dev/urandom, but with a timeout
$SIG{ALRM} = sub { close(RANDOM) };
my $randomfh;
$SIG{ALRM} = sub { close($randomfh) if ($randomfh) };
alarm(5);
if (open(RANDOM, "/dev/urandom")) {
if (open($randomfh, "<", "/dev/urandom")) {
my $tmpsid;
if (read(RANDOM, $tmpsid, 16) == 16) {
if (read($randomfh, $tmpsid, 16) == 16) {
$sid = lc(unpack('h*',$tmpsid));
if ($sid !~ /^[0-9a-fA-F]{32}$/) {
$sid = 'bad';
}
}
close(RANDOM);
close($randomfh);
undef($randomfh);
}
alarm(0);
@@ -2341,7 +2481,7 @@ return $sid eq 'bad' ? undef : $sid;
# Generate an ID string that can be used for a password reset link
sub generate_random_id
{
if (open(my $RANDOM, "</dev/urandom")) {
if (open(my $RANDOM, "<", "/dev/urandom")) {
my $sid;
my $tmpsid;
if (read($RANDOM, $tmpsid, 16) == 16) {
@@ -2350,7 +2490,9 @@ if (open(my $RANDOM, "</dev/urandom")) {
close($RANDOM);
return $sid;
}
return undef;
# Explicit undef: callers consume this in hash-literal value position,
# where bare 'return' would yield () and shift the surrounding pairing.
return undef; ## no critic (ProhibitExplicitReturnUndef)
}
# obsfucate_email(email)
@@ -2368,4 +2510,3 @@ return $mailbox."\@".join(".", @doms);
}
1;

View File

@@ -3,7 +3,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require 'acl-lib.pl';
require 'acl-lib.pl'; ## no critic
our ($config_directory, %gconfig);
# backup_config_files()
@@ -43,7 +43,7 @@ return @rv;
# Called before the files are actually read
sub pre_backup
{
return undef;
return;
}
# post_backup(&files)
@@ -52,7 +52,7 @@ sub post_backup
{
unlink("$config_directory/config.aclbackup");
unlink("$config_directory/miniserv.conf.aclbackup");
return undef;
return;
}
# pre_restore(&files)
@@ -66,7 +66,7 @@ foreach my $u (&list_users(), &list_groups()) {
glob("$config_directory/*/$u->{'name'}.acl"));
}
}
return undef;
return;
}
# post_restore(&files)
@@ -101,7 +101,7 @@ foreach my $k (keys %aclbackup) {
&put_miniserv_config(\%miniserv);
&restart_miniserv();
return undef;
return;
}
1;

View File

@@ -5,11 +5,11 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
&ui_print_header(undef, $text{'cert_title'}, "", undef, undef, undef, undef,
undef, undef, "language=VBSCRIPT onload='postLoad()'");
eval "use Net::SSLeay";
eval { require Net::SSLeay; Net::SSLeay->import; 1 };
print "<p>$text{'cert_msg'}<p>\n";
if ($ENV{'SSL_USER'}) {

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $module_config_directory, $base_remote_user);
&ReadParse();

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
&ReadParse();

View File

@@ -27,5 +27,5 @@ elsif ($cgi eq 'edit_acl.cgi') {
}
return 'none';
}
return undef;
return;
}

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $config_directory);
&ReadParse();
&error_setup($text{'convert_err'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'sync'} && $access{'create'} || &error($text{'convert_ecannot'});
&ui_print_header(undef, $text{'convert_title'}, "");

View File

@@ -19,7 +19,6 @@ sessions=1
cats=1
ips=1
switch=1
rbacenable=1
logouttime=1
times=1
minsize=1

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&ReadParse();
&error_setup($text{'gdelete_err'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&ReadParse();
&error_setup($text{'gdeletes_err'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, %sessiondb);
&ReadParse();
$access{'sessions'} || &error($text{'sessions_ecannot'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&ReadParse();
&error_setup($text{'delete_err'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&ReadParse();
&error_setup($in{'joingroup'} ? $text{'udeletes_jerr'} : $text{'udeletes_err'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user, %gconfig);
&ReadParse();
$access{'acl'} || &error($text{'acl_emod'});
@@ -48,15 +48,6 @@ else {
}
print &ui_table_start(&text('acl_options', $minfo{'desc'}), "width=100%", 4);
if ($in{'mod'} && $in{'user'} && &supports_rbac($in{'mod'}) &&
!$gconfig{'rbacdeny_'.$who}) {
# Show RBAC option
print &ui_table_row($text{'acl_rbac'},
&ui_radio("rbac", $maccess{'rbac'} ? 1 : 0,
[ [ 1, $text{'acl_rbacyes'} ],
[ 0, $text{'no'} ] ]), 3);
}
# Load custom ACL library
my $mdir = &module_root_directory($in{'mod'});
if (-r "$mdir/acl_security.pl") {

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $config_directory);
&ReadParse();
$access{'groups'} || &error($text{'gedit_ecannot'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'pass_ecannot'});
&ui_print_header(undef, $text{'pass_title'}, "");

View File

@@ -1,32 +0,0 @@
#!/usr/local/bin/perl
# Show RBAC status
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
our (%in, %text, %gconfig, %access, $module_name, $module_root_directory);
$access{'rbacenable'} || &error($text{'rbac_ecannot'});
&ui_print_header(undef, $text{'rbac_title'}, "");
print "$text{'rbac_desc'}<p>\n";
if ($gconfig{'os_type'} ne 'solaris') {
print &text('rbac_esolaris', $gconfig{'real_os_type'}),"<p>\n";
}
elsif (!&supports_rbac()) {
if (&foreign_available("cpan")) {
print &text('rbac_eperl', "<tt>Authen::SolarisRBAC</tt>",
"../cpan/download.cgi?source=0&local=$module_root_directory/Authen-SolarisRBAC-0.1.tar.gz&mode=2&return=/$module_name/&returndesc=".&urlize($text{'index_return'})),"<p>\n";
}
else {
print &text('rbac_ecpan', "<tt>Authen::SolarisRBAC</tt>"),
"<p>\n";
}
}
else {
print "$text{'rbac_ok'}<p>\n";
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'sql'} || &error($text{'sql_ecannot'});
&ui_print_header(undef, $text{'sql_title'}, "");

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'sync'} && $access{'create'} && $access{'delete'} ||
&error($text{'sync_ecannot'});

View File

@@ -7,7 +7,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'unix'} && $access{'create'} && $access{'delete'} ||
&error($text{'unix_ecannot'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %gconfig, %access, $config_directory, $base_remote_user, $remote_user);
&foreign_require("webmin", "webmin-lib.pl");
@@ -42,6 +42,11 @@ else {
: $text{'edit_title2'}, "");
}
my $me = &get_user($base_remote_user);
my %uaccess = &get_module_acl($in{'user'} || "", "", 1);
if (!$in{'user'} && $uaccess{'rpc'} == 2) {
# Don't offer the confusing 'root' or 'admin' RPC option by default
$uaccess{'rpc'} = 0;
}
# Give up if readonly
if ($user{'readonly'} && !$in{'readwrite'}) {
@@ -210,7 +215,10 @@ if ($access{'lang'}) {
if ($access{'locale'}) {
# Current locale
eval "use DateTime; use DateTime::Locale; use DateTime::TimeZone;";
eval { require DateTime; DateTime->import;
require DateTime::Locale; DateTime::Locale->import;
require DateTime::TimeZone; DateTime::TimeZone->import;
1 };
if (!$@ && $] > 5.011) {
my $locales = &list_locales();
my %localesrev = reverse %{$locales};
@@ -280,7 +288,7 @@ if ($showui) {
# Start of security options section
my $showsecurity = $access{'logouttime'} || $access{'ips'} ||
$access{'minsize'} ||
&supports_rbac() && $access{'mode'} == 0 || $access{'times'};
$access{'times'};
if ($showsecurity) {
print &ui_hidden_table_start($text{'edit_security'}, "width=100%", 2,
"security", 0, [ "width=30%" ]);
@@ -321,14 +329,6 @@ if ($access{'ips'}) {
4, 30));
}
if (&supports_rbac() && $access{'mode'} == 0) {
# Deny access to modules not managed by RBAC?
print &ui_table_row($text{'edit_rbacdeny'},
&ui_radio("rbacdeny", $user{'rbacdeny'} ? 1 : 0,
[ [ 0, $text{'edit_rbacdeny0'} ],
[ 1, $text{'edit_rbacdeny1'} ] ]));
}
if ($access{'times'}) {
# Show allowed days of the week
my %days = map { $_, 1 } split(/,/, $user{'days'} || '');
@@ -371,6 +371,16 @@ elsif ($miniserv{'twofactor_provider'}) {
&ui_submit($text{'edit_twofactoradd'}, "twofactor"));
}
# Can accept RPC calls?
if ($access{'acl'} && !$safe) {
print &ui_table_row(&hlink($text{'acl_rpc'}, 'rpc'),
&ui_radio("rpc", int($uaccess{'rpc'}),
[ [ 1, $text{'acl_rpc1'} ],
$uaccess{'rpc'} == 2 ? ( [ 2, $text{'acl_rpc2'} ] ) : ( ),
[ 3, $text{'acl_rpc3'} ],
[ 0, $text{'acl_rpc0'} ] ]));
}
print &ui_hidden_table_end("security");
# Work out which modules can be selected
@@ -450,11 +460,9 @@ print &ui_hidden_table_end("mods");
# Add global ACL section, but only if not set from the group
my $groupglobal = $memg && -r "$config_directory/$memg->{'name'}.acl";
if ($access{'acl'} && !$groupglobal && $in{'user'} && !$safe) {
if ($access{'acl'} && !$groupglobal && !$safe) {
print &ui_hidden_table_start($text{'edit_global'}, "width=100%", 2,
"global", 0, [ "width=30%" ]);
my %uaccess;
%uaccess = &get_module_acl($in{'user'}, "", 1);
print &ui_hidden("acl_security_form", 1);
&foreign_require("", "acl_security.pl");
&foreign_call("", "acl_security_form", \%uaccess);

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text);
&foreign_require("webmin");
&error_setup($text{'forgot_err'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %gconfig);
&foreign_require("webmin");
&error_setup($text{'forgot_err'});

14
acl/help/rpc.html Normal file
View File

@@ -0,0 +1,14 @@
<header>Can accept RPC calls?</header>
This option determines if the user can make use of Webmin's poweful RPC calls
feature, which is designed to allow this system to be controlled by a script
or other Webmin server via HTTP. Because the RPC feature does <b>not</b>
respect any module grants or fine-grained access controls, this option should
only be enabled for fully trusted <tt>root</tt>-equivalent users. <p>
In addition, if the <b>RPC calls only</b> option is selected, the user will not
be able to use the Webmin UI. This is useful for creating a separate login with
a longer password for RPC purposes only, as two-factor authentication cannot be
used when making RPC calls. <p>
<footer>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %gconfig, %access, $base_remote_user);
&ReadParse();
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
@@ -206,11 +206,6 @@ if (uc($ENV{'HTTPS'}) eq "ON" && $miniserv{'ca'}) {
push(@icons, "images/twofactor.gif");
push(@links, "twofactor_form.cgi");
push(@titles, $text{'index_twofactor'});
if ($access{'rbacenable'} && $gconfig{'os_type'} eq 'solaris') {
push(@icons, "images/rbac.gif");
push(@links, "edit_rbac.cgi");
push(@titles, $text{'index_rbac'});
}
if ($access{'pass'}) {
push(@icons, "images/pass.gif");
push(@links, "edit_pass.cgi");

View File

@@ -23,7 +23,6 @@ index_modgroups=Modules from group $1
index_sync=Configure Unix User Synchronization
index_unix=Configure Unix User Authentication
index_sessions=View Login Sessions
index_rbac=Setup RBAC
index_delete=Delete Selected
index_joingroup=Add To Group:
index_eulist=Failed to list users : $1
@@ -95,9 +94,6 @@ edit_switch=Switch to User
edit_forgot=Send Password Reset Link
edit_return=Webmin user
edit_return2=Webmin group
edit_rbacdeny=RBAC access mode
edit_rbacdeny0=RBAC only controls selected module ACLs
edit_rbacdeny1=RBAC controls all modules and ACLs
edit_global=Permissions for all modules
edit_templock=Temporarily locked
edit_temppass=Force change at next login
@@ -185,8 +181,6 @@ acl_title3=For group $1 in $2
acl_options=$1 access control options
acl_config=Can edit module configuration?
acl_reset=Reset To Full Access
acl_rbac=Get access control settings from RBAC?
acl_rbacyes=Yes (overrides settings below)
acl_uall=All users
acl_uthis=This user
@@ -382,13 +376,6 @@ hide_clone=(Clone $1)
switch_euser=You are not allowed to switch to this user
switch_eold=Existing session not found!
rbac_title=Setup RBAC
rbac_desc=Webmin's RBAC integration provides a way for user module and ACL permissions to be determined from an RBAC (Role Based Access Control) database, rather than Webmin's own configuration files. Once RBAC support is enabled, any user for whom the <b>RBAC controls all modules and ACLs</b> option is selected will have his capabilities determined by RBAC rather than Webmin's own access control settings.
rbac_esolaris=RBAC is only supported on Solaris at the moment, and so cannot be used on this $1 system.
rbac_eperl=The Perl module $1 needed for RBAC integration is not installed. <a href='$2'>Click here</a> to have it installed now.
rbac_ecpan=You do not have access to Webmin's Perl Modules page in order to install the necessary $1 module for RBAC integration.
rbac_ok=RBAC integration is available on this system, and can be enabled on a per-user basis on the Edit Webmin User page.
udeletes_err=Failed to delete users
udeletes_jerr=Failed to add users to group
udeletes_enone=None selected
@@ -514,9 +501,18 @@ twofactor_enable=Enroll For Two-Factor Authentication
twofactor_header=Two-factor authentication enrollment details
twofactor_enrolling=Enrolling for two-factor authentication with provider $1 ..
twofactor_failed=.. enrollment failed : $1
twofactor_done=.. complete. Your ID with this provider is <tt>$1</tt>.
twofactor_done=.. completed, with ID <tt>$1</tt>
twofactor_setup=Two-factor authentication has not been enabled on this system yet, but can be turned on using the <a href='$1'>Webmin Configuration</a> module.
twofactor_ebutton=No button clicked!
twofactor_testdesc=Before logging out, you can test your new two-factor authentication setup here by entering a token. If for some reason it doesn't work, turn off two-factor authentication and try setting it up again.
twofactor_testfield=Two-factor token
twofactor_test=Validate Token
twofactor_terr=Failed to test two-factor setup
twofactor_etestuser=Login does not have two-factor enabled!
twofactor_testing=Testing two-factor validation with $1 ..
twofactor_testfailed=.. test failed! Maybe the wrong token was entered, or your authentication app has not been configured correctly?
twofactor_testok=.. test passed! You can now safely login using two-factor authentication.
twofactor_testdis=Disable Two-Factor Now
forgot_title=Send Password Reset Link
forgot_err=Failed to send password reset link

View File

@@ -1,9 +1,9 @@
index_title=Webmin Brukere
index_user=Brukere
index_modules=Moduler
index_create=Opprett ny Webmin bruker
index_create=Opprett ny Webmin-bruker
index_screate=Opprett ny sikker bruker
index_convert=Konverter Unix til Webmin brukere
index_convert=Konverter Unix til Webmin-brukere
index_cert=Krever SSL sertifikat
index_twofactor=To-faktor autentisering
index_certmsg=Klikk på denne knappen for å spørre etter et SSL sertifikat som vil gi deg sikker login i Webmin uten å måtte skrive brukernavn og passord.
@@ -14,7 +14,7 @@ index_global=Global ACL
index_users=Webmin Brukere
index_groups=Webmin Grupper
index_group=Gruppe
index_nousers=Ingen editerbar Webmin bruker er definert.
index_nousers=Ingen editerbar Webmin-bruker er definert.
index_nogroups=Ingen editerbar Webmin gruppe er definert.
index_gcreate=Lag en ny Webmin gruppe
index_members=Medlemmer
@@ -30,11 +30,11 @@ index_eglist=Kunne ikke liste grupper : $1
edit_title=Rediger Webmin Bruker
edit_title2=Lag Webmin Bruker
edit_title3=Opprett sikker Webmin bruker
edit_readonly=Denne Webmin brukeren bør ikke redigeres siden den vedlikeholdes av modulen $1. <a href='$2'>Klikk her</a> for å ignorere denne advarselen og redigere brukeren allikevel - men vær oppmerksom på at manuelle endringer kan bli overskrevet!
edit_rights=Tilgangsrettigheter for Webmin bruker
edit_title3=Opprett sikker Webmin-bruker
edit_readonly=Denne Webmin-brukeren bør ikke redigeres siden den vedlikeholdes av modulen $1. <a href='$2'>Klikk her</a> for å ignorere denne advarselen og redigere brukeren allikevel - men vær oppmerksom på at manuelle endringer kan bli overskrevet!
edit_rights=Tilgangsrettigheter for Webmin-bruker
edit_user=Brukernavn
edit_cloneof=Klober Webmin bruker
edit_cloneof=Klober Webmin-bruker
edit_real=Virkelig navn
edit_group=Medlem av gruppe
edit_pass=Passord
@@ -89,7 +89,7 @@ edit_selall=Velg alle
edit_invert=Inverter valg
edit_hide=Skjul ubrukte
edit_switch=Bytt til bruker
edit_return=Webmin bruker
edit_return=Webmin-bruker
edit_return2=Webmin gruppe
edit_rbacdeny=RBAC tilgangsmodus
edit_rbacdeny0=RBAC kontrollerer valgte modul ACLer
@@ -126,21 +126,21 @@ save_eoverlay=Et tema-overlegg kan ikke velges med mindre et tema er
save_edeny=Du kan ikke nekte deg selv tilgang til Webmin Bruker modulen
save_eos=Det samme som Unix passord opsjonen er ikke støttet på ditt operativsystem.
save_emd5=Det samme som Unix passord opsjonen kan ikke brukes på systemer med MD5 kryptering
save_eunix=Unix bruker '$1' eksisterer ikke
save_eunix=Unix-brukeren '$1' eksisterer ikke
save_emod=Du kan ikke bevilge tilgang til modul '$1'
save_ecreate=Du har ikke tilgang til å opprette brukere
save_euser=Du har ikke tilgang til å editere denne brukeren
save_euser=Du har ikke tilgang til å redigere denne brukeren
save_ecolon=Passord kan ikke inneholde : karakteren
save_epass=Passord er ikke gyldig : $1
save_eself=Din vanlige IP adresse ($1) vil bli nektet
save_eself=Din vanlige IP-adresse ($1) vil bli nektet
save_epam=PAM autentisering er ikke tilgjengelig fordi <tt>Authen::PAM</tt> Perl modulen ikke er installert eller ikke virker ordentlig.
save_epam2=Du kan bruke Webmin's Perl Modules modul til <a href='$1'>laste ned å installere Authen::PAM</a> nå.
save_egroup=Du har ikke rettigheter til å tildele til den gruppen
save_enone=Ingen adresse er tastet inn
save_enet='$1' er ikke en gyldig nettverks adresse
save_enet='$1' er ikke en gyldig nettverksadresse
save_emask='$1' er ikke en gyldig nettmaske
save_eip='$1' er ikke en komplett IP eller nettverks adresse
save_ehost=Kunne ikke finne IP adresse for '$1'
save_eip='$1' er ikke en komplett IP eller nettverksadresse
save_ehost=Kunne ikke finne IP-adresse for '$1'
save_elogouttime=Manglende eller ikke-numerisk tid for utlogging ved inaktivitet
save_eminsize=Manglende eller ikke-numerisk minimum passordlengde
save_edays=Ingen tillatte dager valgt
@@ -223,11 +223,11 @@ acl_times=Kan endre tillatte innloggings-tider?
acl_pass=Kan endre passord-begrensinger?
acl_sql=Kan konfigurere databasen for brukere og grupper?
log_modify=Modifisert Webmin bruker $1
log_rename=Skiftet navn på Webmin bruker $1 til $2
log_create=Opprettet Webmin bruker $1
log_clone=Klonet Webmin bruker $1 til $2
log_delete=Slettet Webmin bruker $1
log_modify=Modifisert Webmin-bruker $1
log_rename=Skiftet navn på Webmin-bruker $1 til $2
log_create=Opprettet Webmin-bruker $1
log_clone=Klonet Webmin-bruker $1 til $2
log_delete=Slettet Webmin-bruker $1
log_acl=Oppdatert tilgang for $1 i $2
log_reset=Tilbakestilte tilgang for $1 i $2
log_cert=Utlevert sertifikat for bruker $1
@@ -235,10 +235,10 @@ log_modify_g=Modifisert Webmin gruppe $1
log_rename_g=Forandret navn på Webmin gruppe $1 til $2
log_create_g=Opprettet Webmin gruppe $1
log_delete_g=Slettet Webmin gruppe $1
log_switch=Byttet til Webmin bruker $1
log_delete_users=Slettet $1 Webmin brukere
log_switch=Byttet til Webmin-bruker $1
log_delete_users=Slettet $1 Webmin-brukere
log_delete_groups=Slettet $1 Webmin grupper
log_joingroup=La til $1 Webmin brukere i gruppe $2
log_joingroup=La til $1 Webmin-brukere i gruppe $2
log_pass=Endret passord-begrensinger
log_unix=Endret unix bruker-autentisering
log_sync=Endret unix bruker-synkronisering
@@ -273,7 +273,7 @@ gsave_edesc=Ugyldig beskrivelse - tegnet : er ikke tillatt
convert_title=Konverter Brukere
convert_ecannot=Du har ikke tilgang til å konvertere Unix brukere
convert_nogroups=Ingen Webmin gruppe er definert på ditt system. Du må i det minste lage en gruppe før du konverterer brukere, dette for å kunne sette rettigheter for konverterte brukere.
convert_desc=Denne Dette feltet lar deg konvertere eksisterende Unix brukere til Webmin brukere. Rettighetene til hver nye Webmin bruker vil bestemmes av rettighetene til gruppen som valgt over.
convert_desc=Denne Dette feltet lar deg konvertere eksisterende Unix-brukere til Webmin-brukere. Rettighetene til hver nye Webmin-bruker vil bestemmes av rettighetene til gruppen som valgt over.
convert_0=Alle brukere
convert_1=Bare brukere
convert_2=Alle unntagen brukere
@@ -284,43 +284,43 @@ convert_sync2=Synk. passord med Unix-bruker i fremtiden?
convert_ok=Konverter nå
convert_err=Kunne ikke konvertere brukere
convert_eusers=Ingen brukere inntastet
convert_egroup=Unix gruppe eksisterer ikke
convert_emin=Ugyldig minimum bruker ID (UID)
convert_emax=Ugyldig maksimum bruker ID (UID)
convert_egroup=Unix-gruppen eksisterer ikke
convert_emin=Ugyldig minimum bruker-ID (UID)
convert_emax=Ugyldig maksimum bruker-ID (UID)
convert_ewgroup=Ingen sånn Webmin gruppe
convert_ewgroup2=Du har ikke rettigheter til å tilordne nye brukere til denne gruppen
convert_skip=Hoppet over $1
convert_exists=$1 Eksisterer allerede
convert_invalid=$1 er ikke et gyldig Webmin brukernavn
convert_invalid=$1 er ikke et gyldig Webmin-brukernavn
convert_added=$1 er lagt til
convert_msg=Konverterer Unix brukere...
convert_msg=Konverterer Unix-brukere...
convert_user=Unix-bruker
convert_action=Handling utført
convert_action=Handling utført
convert_done=$1 brukere konvertert, $2 ugyldig, $3 finnes allerede, $4 ekskludert.
convert_users=Brukere som skal konverteres
sync_title=Unix Bruker Synkronisering
sync_desc=Dette feltet lar deg konfigurere automatisk synkronisering av Unix brukere laget via Webmin og brukere i denne modulen.
sync_title=Unix-brukersynkronisering
sync_desc=Dette feltet lar deg konfigurere automatisk synkronisering av Unix-brukere laget via Webmin og brukere i denne modulen.
sync_nogroups=Ingen Webmin gruppe er definert på ditt system. Du må i det minste lage en gruppe før du konverterer brukere, dette for å kunne sette rettigheter for konverterte brukere.
sync_when=Synkroniser når
sync_create=Opprett Webmin bruker når en Unix bruker blir laget.
sync_update=Oppdater passende Webmin bruker når Unix brukere blir oppdatert.
sync_delete=Slett passende Webmin bruker når Unix brukere blir slettet.
sync_create=Opprett Webmin-bruker når en Unix bruker blir laget.
sync_update=Oppdater passende Webmin-bruker når Unix-brukere blir oppdatert.
sync_delete=Slett passende Webmin-bruker når Unix-brukere blir slettet.
sync_group=Tilordne ny bruker til Webmin gruppe
sync_unix=Sett passord for nye brukere til Unix autentisering
sync_ecannot=Du har ikke rettigheter til å konfigurere bruker synkronisering.
unix_title=Unix Bruker Autentisering
unix_title=Unix-brukerautentisering
unix_err=Kunne ikke lagre Unix autentisering
unix_desc=Denne siden lar deg konfigurere Webmin til verifisere login forsøk med systemets bruker liste og PAM. Dette kan være nyttig hvis du har mange eksisterende Unix brukere som du ønsker å gi tilgang til Webmin.
unix_def=Tillat bare login av Webmin brukere
unix_sel=Tillat Unix brukere i listen nedenfor å logge inn ..
unix_desc=Denne siden lar deg konfigurere Webmin til verifisere login forsøk med systemets bruker liste og PAM. Dette kan være nyttig hvis du har mange eksisterende Unix-brukere som du ønsker å gi tilgang til Webmin.
unix_def=Tillat bare login av Webmin-brukere
unix_sel=Tillat Unix-brukere i listen nedenfor å logge inn ..
unix_mode=Tillat
unix_mall=Alle brukere
unix_group=Medlemmer i gruppen..
unix_user=Tillat alle Unix brukere login med rettigheter som Users
unix_user=Tillat alle Unix-brukere login med rettigheter som Users
unix_who=Bruker eller gruppe
unix_to=Som Webmin bruker
unix_to=Som Webmin-bruker
unix_ecannot=Du har ikke rettigheter til å konfigurere Unix bruker autentisering
unix_epam=Unix autentisering er ikke tilgjengelig fordi <tt>Authen::PAM</tt> Perl modul ikke er installert eller ikke virker som den skal.
unix_all=Tillat alle Unix brukere
@@ -329,12 +329,12 @@ unix_deny=Nekt listede Unix brukere
unix_none=Ingen brukere angitt
unix_euser='$1' er ikke et gyldig brukernavn
unix_egroup='$1' er ikke et gyldig gruppenavn
unix_shells=Nekt Unix brukere hvis skall ikke finnes i filen
unix_shells=Nekt Unix-brukere hvis skall ikke finnes i filen
unix_eshells=Manglende eller ikke-eksisterende shells fil
unix_restrict2=Ekstra restriksjoner
unix_ewhogroup=Manglende tillatt gruppe i rad $1
unix_ewhouser=Manglende tilllatt bruker i rad $1
unix_enone=Ingen tillatte Unix brukere og grupper ble angitt
unix_enone=Ingen tillatte Unix-brukere og grupper ble angitt
unix_same=&lt;Samme bruker eller gruppe&gt;
unix_sudo=TIllatt brukere som kan kjøre alle kommandoer via <tt>sudo</tt> å logge inn som <tt>root</tt>
unix_pamany=Behandle brukere som bare sender PAM validering som $1
@@ -345,9 +345,9 @@ unix_utable=Tillatte Unix brukere
sessions_title=Aktuell Login Session
sessions_id=Sessions ID
sessions_user=Webmin bruker
sessions_user=Webmin-bruker
sessions_login=Innlogget
sessions_host=IP adresse
sessions_host=IP-adresse
sessions_lview=Se logger..
sessions_actions=Handlinger..
sessions_logouts=Vis også utloggede sesjoner..
@@ -357,7 +357,7 @@ sessions_in=Innlogget
sessions_out=Logget ut
sessions_kill=Koble fra..
logins_title=Siste Webmin innlogginger
logins_title=Siste Webmin-innlogginger
hide_title=Skjul ubrukte moduler
hide_desc=Følgende moduler vil bli fjernet fra modul tilgangslisten for $1 siden deres tilhørende tjenere ikke er installert på systemet ditt ..
@@ -374,7 +374,7 @@ rbac_desc=Webmin's RBAC integration provides a way for user module and ACL permi
rbac_esolaris=RBAC støttes bare på Solaris systemer for øyeblikket, og kan derfor ikke brukes på dette $1 systemet.
rbac_eperl=Perl-modulen $1, som behøves for RBAC integrasjon, er ikke installert. <a href='$2'>Klikk her</a> for å installere den nå.
rbac_ecpan=Du har ikke tilgang til Webmins Perl Moduler side for å kunne installere den nødvendige $1 modulen for RBAC integrasjon.
rbac_ok=RBAC integrasjon er tilgjengelig for dette systemet, og kan aktiveres per bruker på siden Rediger Webmin bruker.
rbac_ok=RBAC integrasjon er tilgjengelig for dette systemet, og kan aktiveres per bruker på siden Rediger Webmin-bruker.
udeletes_err=Kunne ikke slette brukere
udeletes_jerr=Kunne ikke legg til brukere i gruppe
@@ -391,7 +391,7 @@ gdeletes_rusure=Er du sikker på at du ønsker å slette de $1 valgte gruppene o
gdeletes_users=Valgte grupper: $1
gdeletes_ok=Slett grupper
pass_title=Passord begrensinger
pass_title=Passordbegrensinger
pass_ecannot=Du har ikke lov til å redigere passord-begrensinger
pass_header=Innstillinger for Webmin passord begrensinger
pass_minsize=Minimum passordlengde
@@ -424,7 +424,7 @@ cpass_old=Gamle passord kan ikke brukes på nytt
sql_title=Bruker- og gruppe-database
sql_ecannot=Du har ikke lov til å konfigurere bruker- og gruppedatabasen
sql_header=Instillinger for database backend for brukere og grupper
sql_header=Innstillinger for database backend for brukere og grupper
sql_host=Vertsnavn
sql_user=Brukernavn
sql_pass=Passord
@@ -456,7 +456,7 @@ sql_edb=Ugyldig databasenavn (mellomrom ikke tillatt)
sql_eprefix=Manglende eller ugyldig base DN (mellomrom ikke tillatt)
sql_eprefix2=Ugyldig-utseende base DN - skal være på formen <tt>dc=mittdomene,dc=no</tt>
sql_title2=Opprett manglende tabeller
sql_tableerr=Instillinger for bruker- og gruppedatabase er gyldig, men noen tabeller som Webmin trenger, mangler : $1
sql_tableerr=Innstillinger for bruker- og gruppedatabase er gyldig, men noen tabeller som Webmin trenger, mangler : $1
sql_tableerr2=Klikk på knappen <b>Opprett tabeller</b> nedenfor, for å få opprettet dem automatisk, eller du kan kjøre SQL uttrykket nedenfor manuelt.
sql_make=Opprett tabeller
sql_title3=Opprett manglende DN
@@ -489,7 +489,7 @@ twofactor_title=To-faktor autentisering
twofactor_disable=Deaktiver to-faktor autentisering
twofactor_already=Din Webmin-bruker har allerede to-faktor autentisering aktivert med leverandør %1 og konto ID %2.
twofactor_already2=Webmin-brukeren %3 har allerede to-faktor autentisering aktivert med leverandør %1 og konto ID %2.
twofactor_desc=Denne siden lar deg aktivere to-faktor autentisering for din Webmin bruker vha. <a href='$2' target=_blank>$1</a>. Når denne er aktivert kreves det et ekstra autentiserings-token når du logger inn på Webmin.
twofactor_desc=Denne siden lar deg aktivere to-faktor autentisering for din Webmin-bruker vha. <a href='$2' target=_blank>$1</a>. Når denne er aktivert kreves det et ekstra autentiserings-token når du logger inn på Webmin.
twofactor_desc2=Denne siden lar deg aktivere to-faktor autentisering for Webmin-brukeren $1 vha. <a href='$2' target=_blank>$1</a>. Når denne er aktivert vil det kreves et ekstra autentiserings-token for å logge inn på Webmin.
twofactor_enable=Meld inn til to-faktor autentisering
twofactor_header=Detaljer for innmelding til to-faktor autentisering

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, %sessiondb);
$access{'sessions'} || &error($text{'sessions_ecannot'});
&ui_print_header(undef, $text{'sessions_title'}, "");

View File

@@ -16,8 +16,9 @@ my ($user, $script, $action, $type, $object, $p) = @_;
my $g = $type eq 'group' ? "_g" : "";
if ($action eq 'modify') {
if ($p->{'old'} ne $p->{'name'}) {
return &text('log_rename'.$g, "<tt>$p->{'old'}</tt>",
"<tt>$p->{'name'}</tt>");
return &text('log_rename'.$g,
"<tt>".&html_escape($p->{'old'})."</tt>",
"<tt>".&html_escape($p->{'name'})."</tt>");
}
else {
return &text('log_modify'.$g,
@@ -26,7 +27,8 @@ if ($action eq 'modify') {
}
elsif ($action eq 'create') {
if ($p->{'clone'}) {
return &text('log_clone'.$g, "<tt>$p->{'clone'}</tt>",
return &text('log_clone'.$g,
"<tt>".&html_escape($p->{'clone'})."</tt>",
"<tt>".&html_escape($object)."</tt>");
}
else {
@@ -36,21 +38,23 @@ elsif ($action eq 'create') {
}
elsif ($action eq 'delete') {
if ($type eq "users" || $type eq "groups") {
return &text('log_delete_'.$type, $object);
return &text('log_delete_'.$type, &html_escape($object));
}
else {
return &text('log_delete'.$g, "<tt>$object</tt>");
return &text('log_delete'.$g,
"<tt>".&html_escape($object)."</tt>");
}
}
elsif ($action eq 'joingroup') {
return &text('log_joingroup', $object, $p->{'group'});
return &text('log_joingroup', &html_escape($object),
&html_escape($p->{'group'}));
}
elsif ($action eq 'acl') {
return &text('log_acl', "<tt>$object</tt>",
return &text('log_acl', "<tt>".&html_escape($object)."</tt>",
"<i>".&html_escape($p->{'moddesc'})."</i>");
}
elsif ($action eq 'reset') {
return &text('log_reset', "<tt>$object</tt>",
return &text('log_reset', "<tt>".&html_escape($object)."</tt>",
"<i>".&html_escape($p->{'moddesc'})."</i>");
}
elsif ($action eq 'cert') {
@@ -60,7 +64,9 @@ elsif ($action eq 'switch') {
return &text('log_switch', "<tt>".&html_escape($object)."</tt>");
}
elsif ($action eq 'twofactor') {
return &text('log_twofactor', $object, $p->{'provider'}, $p->{'id'});
return &text('log_twofactor', &html_escape($object),
&html_escape($p->{'provider'}),
&html_escape($p->{'id'}));
}
elsif ($action eq 'forgot') {
return &text('log_forgot_'.$type, &html_escape($p->{'user'}),

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'sql_ecannot'});
&ReadParse();

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'sql_ecannot'});
&ReadParse();

View File

@@ -3,7 +3,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require 'acl-lib.pl';
require 'acl-lib.pl'; ## no critic
our ($config_directory);
# Rename the .acl files for any groups to .gacl files

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user, %gconfig,
$config_directory);
&ReadParse();
@@ -54,13 +54,8 @@ else {
if (defined($in{'noconfig'})) {
$maccess{'noconfig'} = $in{'noconfig'};
}
if ($in{'rbac'}) {
# RBAC overrides everything
$maccess{'rbac'} = 1;
}
elsif (-r "../$in{'_acl_mod'}/acl_security.pl") {
if (-r "../$in{'_acl_mod'}/acl_security.pl") {
# Use user inputs
$maccess{'rbac'} = 0 if (defined($in{'rbac'}));
&foreign_require($in{'_acl_mod'}, "acl_security.pl");
&foreign_call($in{'_acl_mod'}, "acl_security_save",
\%maccess, \%in);

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $config_directory);
&ReadParse();

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'pass_ecannot'});
&error_setup($text{'pass_err'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'sql_ecannot'});
&ReadParse();

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $module_config_directory);
&ReadParse();
$access{'sync'} && $access{'create'} && $access{'delete'} ||

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&foreign_require("webmin");
&error_setup($text{'twofactor_err'});
@@ -55,7 +55,7 @@ if ($in{'enable'}) {
my $mfunc = "webmin::message_twofactor_".
$miniserv{'twofactor_provider'};
if (defined(&{\&{$mfunc}})) {
print &{\&{$mfunc}}($user);
print "<p></p>".&{\&{$mfunc}}($user);
}
# Save user
@@ -65,6 +65,19 @@ if ($in{'enable'}) {
&webmin_log("twofactor", "user", $user->{'name'},
{ 'provider' => $user->{'twofactor_provider'},
'id' => $user->{'twofactor_id'} });
# Show a test form only when enrolling for yourself
if ($user->{'name'} eq $base_remote_user) {
print &ui_form_start("test_twofactor.cgi");
print &ui_tag('p', $text{'twofactor_testdesc'});
print &ui_tag('p', "$text{'twofactor_testfield'}".
"&nbsp;&nbsp;".
&ui_textbox("test", undef, 12));
print &ui_hidden("user", $in{'user'}) if ($in{'user'});
print &ui_tag('p');
print &ui_form_end([ [ undef,
$text{'twofactor_test'} ] ]);
}
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
&ReadParse();
&error_setup($text{'unix_err'});
@@ -70,7 +70,7 @@ else {
}
if ($in{'sudo'}) {
&has_command("sudo") || &error(&text('unix_esudo', "<tt>sudo</tt>"));
eval "use IO::Pty";
eval { require IO::Pty; IO::Pty->import; 1 };
$@ && &error(&text('unix_esudomod', "<tt>IO::Pty</tt>"));
}
$miniserv{'sudo'} = $in{'sudo'};

View File

@@ -6,7 +6,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $config_directory, $base_remote_user);
&foreign_require("webmin", "webmin-lib.pl");
&ReadParse();
@@ -105,11 +105,6 @@ foreach my $u (@ulist) {
# Find the current group
my $oldgroup = $in{'old'} ? &get_users_group($in{'old'}) : undef;
if (&supports_rbac()) {
# Save RBAC mode
$user{'rbacdeny'} = $in{'rbacdeny'};
}
my $newgroup;
if (defined($in{'group'})) {
# Check if group is allowed
@@ -374,11 +369,13 @@ else {
}
my $aclfile = "$config_directory/$in{'name'}.acl";
if ($in{'old'} && $in{'acl_security_form'} && !$newgroup && !$in{'safe'}) {
# Update user's global ACL
if ($in{'acl_security_form'} && !$newgroup && !$in{'safe'}) {
# Update user's global ACL, and merge in RPC setting which has
# been moved out of this form
&foreign_require("", "acl_security.pl");
my %uaccess;
&foreign_call("", "acl_security_save", \%uaccess, \%in);
$uaccess{'rpc'} = $in{'rpc'};
&lock_file($aclfile);
&save_module_acl(\%uaccess, $in{'name'}, "", 1);
&set_ownership_permissions(undef, undef, 0640, $aclfile);

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access);
$access{'pass'} || &error($text{'sql_ecannot'});

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, %sessiondb);
&ReadParse();
&can_edit_user($in{'user'}) && $access{'switch'} ||

65
acl/t/perlcritic.t Normal file
View File

@@ -0,0 +1,65 @@
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
BEGIN {
eval { require Perl::Critic; 1 }
or plan skip_all => 'Perl::Critic not installed';
}
use File::Find;
sub script_dir
{
my $path = $0;
if ($path =~ m{^/}) {
$path =~ s{/[^/]+$}{};
return $path;
}
my $cwd = `pwd`;
chomp($cwd);
if ($path =~ m{/}) {
$path =~ s{/[^/]+$}{};
return $cwd.'/'.$path;
}
return $cwd;
}
my $bindir = script_dir();
my $module_dir = "$bindir/..";
chdir($module_dir) or die "chdir: $!";
my @files;
find(
sub {
return if -d;
# Skip symlinks: shared libs (e.g. md5-lib.pl -> ../useradmin/md5-lib.pl)
# belong to the module that owns the underlying file.
return if -l;
return unless /\.(pl|cgi)\z/;
# *.info.pl is the Polish-locale translation of *.info, not Perl code.
return if /\.info\.pl\z/;
push(@files, $File::Find::name);
},
'.'
);
@files = sort @files;
if (!@files) {
plan skip_all => 'no perl files to check';
}
my $critic = Perl::Critic->new(
-profile => "$bindir/../../.perlcriticrc",
);
foreach my $file (@files) {
my @violations = $critic->critique($file);
is(scalar @violations, 0, "$file perlcritic");
if (@violations) {
diag join("", @violations);
}
}
done_testing();

1527
acl/t/run-tests.t Normal file

File diff suppressed because it is too large Load Diff

47
acl/test_twofactor.cgi Executable file
View File

@@ -0,0 +1,47 @@
#!/usr/local/bin/perl
# Validate a user-supplied two-factor token
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl'; ## no critic
our (%in, %text, %access, $base_remote_user);
&foreign_require("webmin");
&error_setup($text{'twofactor_terr'});
&ReadParse();
# Get the user
my @users = &list_users();
my $user;
if ($in{'user'}) {
&can_edit_user($in{'user'}) || &error($text{'edit_euser'});
($user) = grep { $_->{'name'} eq $in{'user'} } @users;
}
else {
($user) = grep { $_->{'name'} eq $base_remote_user } @users;
}
$user || &error($text{'twofactor_euser'});
$user->{'twofactor_provider'} || &error($text{'twofactor_etestuser'});
my @provs = &webmin::list_twofactor_providers();
my ($prov) = grep { $_->[0] eq $user->{'twofactor_provider'} } @provs;
# Call the validation function
&ui_print_header(undef, $text{'twofactor_title'}, "");
print &text('twofactor_testing', $prov->[1]),"<br>\n";
my $func = "webmin::validate_twofactor_".$user->{'twofactor_provider'};
my $err = &{\&{$func}}($user->{'twofactor_id'}, $in{'test'},
$user->{'twofactor_apikey'});
if ($err) {
print &text('twofactor_testfailed', $err),"<p>\n";
print &ui_form_start("save_twofactor.cgi");
print &ui_hidden("user", $in{'user'}) if ($in{'user'});
print &ui_form_end([ [ "disable", $text{'twofactor_testdis'} ] ]);
}
else {
print $text{'twofactor_testok'},"<p>\n";
}
&ui_print_footer("", $text{'index_return'});

View File

@@ -1,6 +1,10 @@
#!/usr/local/bin/perl
# Validate the OTP for some user
use strict;
use warnings;
no warnings 'once';
our $module_name;
$main::no_acl_check = 1;
$main::no_referers_check = 1;
$ENV{'WEBMIN_CONFIG'} = "/etc/webmin";
@@ -8,17 +12,19 @@ $ENV{'WEBMIN_VAR'} = "/var/webmin";
if ($0 =~ /^(.*\/)[^\/]+$/) {
chdir($1);
}
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
$module_name eq 'acl' || die "Command must be run with full path";
# Check command-line args
@ARGV == 5 || die "Usage: $0 user provider id token api-key";
($user, $provider, $id, $token, $apikey) = @ARGV;
my ($user, $provider, $id, $token, $apikey) = @ARGV;
# Call the provider validation function
&foreign_require("webmin");
$func = "webmin::validate_twofactor_".$provider;
$err = &$func($id, $token, $apikey);
my $method = "validate_twofactor_".$provider;
my $code = webmin->can($method)
or die "Unknown twofactor provider: $provider\n";
my $err = $code->($id, $token, $apikey);
if ($err) {
$err =~ s/\r|\n/ /g;
print $err,"\n";

View File

@@ -5,7 +5,7 @@ use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './acl-lib.pl';
require './acl-lib.pl'; ## no critic
our (%in, %text, %config, %access, $base_remote_user);
&foreign_require("webmin");
&error_setup($text{'twofactor_err'});

View File

@@ -16,7 +16,7 @@ print &ui_table_row($text{'acl_root'},
# Other dirs to allow
print &ui_table_row($text{'acl_otherdirs'},
&ui_textarea("otherdirs", join("\n", split(/\t+/, $o->{'otherdirs'})),
5, 40), 3);
3, 40), 3);
# Can see dot files?
print &ui_table_row($text{'acl_nodot'},
@@ -77,18 +77,6 @@ print &ui_table_row($text{'acl_gedit'},
print &ui_table_hr();
# Can submit feedback?
print &ui_table_row($text{'acl_feedback'},
&ui_radio("feedback", int($o->{'feedback'}),
[ map { [ $_, $text{'acl_feedback'.$_} ] } (2,3,1,0) ]));
# Can accept RPC calls?
print &ui_table_row($text{'acl_rpc'},
&ui_radio("rpc", int($o->{'rpc'}),
[ [ 1, $text{'acl_rpc1'} ],
$o->{'rpc'} == 2 ? ( [ 2, $text{'acl_rpc2'} ] ) : ( ),
[ 0, $text{'acl_rpc0'} ] ]));
# Get new permissions?
print &ui_table_row($text{'acl_negative'},
&ui_radio("negative", int($o->{'negative'}),
@@ -110,27 +98,26 @@ print &ui_table_row($text{'acl_webminsearch'},
# Parse the form for global security options
sub acl_security_save
{
$_[0]->{'root'} = $in{'root_def'} ? undef : $in{'root'};
$_[0]->{'otherdirs'} = join("\t", split(/\r?\n/, $in{'otherdirs'}));
$_[0]->{'nodot'} = $in{'nodot'};
my ($o) = @_;
$o->{'root'} = $in{'root_def'} ? undef : $in{'root'};
$o->{'otherdirs'} = join("\t", split(/\r?\n/, $in{'otherdirs'}));
$o->{'nodot'} = $in{'nodot'};
$_[0]->{'uedit_mode'} = $in{'uedit_mode'};
$_[0]->{'uedit'} = $in{'uedit_mode'} == 2 ? $in{'uedit_can'} :
$o->{'uedit_mode'} = $in{'uedit_mode'};
$o->{'uedit'} = $in{'uedit_mode'} == 2 ? $in{'uedit_can'} :
$in{'uedit_mode'} == 3 ? $in{'uedit_cannot'} :
$in{'uedit_mode'} == 4 ? $in{'uedit_uid'} :
$in{'uedit_mode'} == 5 ? getgrnam($in{'uedit_group'}) : "";
$_[0]->{'uedit2'} = $in{'uedit_mode'} == 4 ? $in{'uedit_uid2'} : undef;
$o->{'uedit2'} = $in{'uedit_mode'} == 4 ? $in{'uedit_uid2'} : undef;
$_[0]->{'gedit_mode'} = $in{'gedit_mode'};
$_[0]->{'gedit'} = $in{'gedit_mode'} == 2 ? $in{'gedit_can'} :
$o->{'gedit_mode'} = $in{'gedit_mode'};
$o->{'gedit'} = $in{'gedit_mode'} == 2 ? $in{'gedit_can'} :
$in{'gedit_mode'} == 3 ? $in{'gedit_cannot'} :
$in{'gedit_mode'} == 4 ? $in{'gedit_gid'} : "";
$_[0]->{'gedit2'} = $in{'gedit_mode'} == 4 ? $in{'gedit_gid2'} : undef;
$_[0]->{'feedback'} = $in{'feedback'};
$_[0]->{'rpc'} = $in{'rpc'};
$_[0]->{'negative'} = $in{'negative'};
$_[0]->{'readonly'} = $in{'readonly'};
$_[0]->{'fileunix'} = $in{'fileunix_def'} ? undef : $in{'fileunix'};
$_[0]->{'webminsearch'} = $in{'webminsearch'};
$o->{'gedit2'} = $in{'gedit_mode'} == 4 ? $in{'gedit_gid2'} : undef;
$o->{'negative'} = $in{'negative'};
$o->{'readonly'} = $in{'readonly'};
$o->{'fileunix'} = $in{'fileunix_def'} ? undef : $in{'fileunix'};
$o->{'webminsearch'} = $in{'webminsearch'};
}

View File

@@ -5,115 +5,84 @@ require 'apache-lib.pl';
# Output HTML for editing security options for the apache module
sub acl_security_form
{
print "<tr> <td valign=top rowspan=4><b>$text{'acl_virts'}</b></td>\n";
print "<td rowspan=4 valign=top>\n";
printf "<input type=radio name=virts_def value=1 %s> %s\n",
$_[0]->{'virts'} eq '*' ? 'checked' : '', $text{'acl_vall'};
printf "<input type=radio name=virts_def value=0 %s> %s<br>\n",
$_[0]->{'virts'} eq '*' ? '' : 'checked', $text{'acl_vsel'};
print "<select name=virts multiple size=5>\n";
local $conf = &get_config();
local @virts = ( { 'value' => '__default__' },
&find_directive_struct("VirtualHost", $conf) );
local %vcan = map { $_, 1 } split(/\s+/, $_[0]->{'virts'});
local $v;
foreach $v (@virts) {
local @vn = &virt_acl_name($v);
local ($can) = grep { $vcan{$_} } @vn;
local $vn = $can || $vn[0];
printf "<option value=\"%s\" %s>%s</option>\n",
$vn, $can ? "selected" : "",
$vn eq "__default__" ? $text{'acl_defserv'} : $vn;
my ($o) = @_;
my $conf = &get_config();
my @virts = ( { 'value' => '__default__' },
&find_directive_struct("VirtualHost", $conf) );
my @vsel = $o->{'virts'} eq '*' ? () : split(/\s+/, $o->{'virts'});
my %vcan = map { $_, 1 } @vsel;
my @vopts;
foreach my $v (@virts) {
my @vn = &virt_acl_name($v);
my ($can) = grep { $vcan{$_} } @vn;
my $show = $can || $vn[0];
push(@vopts, [ $show,
$show eq "__default__" ? $text{'acl_defserv'}
: $show ]);
delete($vcan{$can}) if ($can);
}
foreach $vn (keys %vcan) {
next if ($vn eq "*");
printf "<option value=\"%s\" %s>%s</option>\n",
$vn, "selected",
$vn eq "__default__" ? $text{'acl_defserv'} : $vn;
print &ui_table_row($text{'acl_virts'},
&ui_radio("virts_def", $o->{'virts'} eq '*' ? 1 : 0,
[ [ 1, $text{'acl_vall'} ],
[ 0, $text{'acl_vsel'} ] ])."<br>\n".
&ui_select("virts", \@vsel, \@vopts, 5, 1, 1),
3);
print &ui_table_row($text{'acl_global'},
&ui_select("global",
defined($o->{'global'}) && $o->{'global'} ne '' ?
$o->{'global'} : 0,
[ [ 1, $text{'yes'} ],
[ 2, $text{'acl_htaccess'} ],
[ 0, $text{'no'} ] ]));
print &ui_table_row($text{'acl_create'},
&ui_yesno_radio("create", $o->{'create'}));
print &ui_table_row($text{'acl_vuser'},
&ui_yesno_radio("vuser", $o->{'vuser'}));
print &ui_table_row($text{'acl_vaddr'},
&ui_yesno_radio("vaddr", $o->{'vaddr'}));
print &ui_table_row($text{'acl_pipe'},
&ui_yesno_radio("pipe", $o->{'pipe'}));
print &ui_table_row($text{'acl_stop'},
&ui_yesno_radio("stop", $o->{'stop'}));
print &ui_table_row($text{'acl_apply'},
&ui_yesno_radio("apply", $o->{'apply'}));
print &ui_table_row($text{'acl_names'},
&ui_yesno_radio("names", $o->{'names'}));
print &ui_table_row($text{'acl_dir'},
&ui_textbox("dir", $o->{'dir'}, 30)." ".
&file_chooser_button("dir", 1),
3);
print &ui_table_row($text{'acl_aliasdir'},
&ui_textbox("aliasdir", $o->{'aliasdir'}, 30)." ".
&file_chooser_button("aliasdir", 1),
3);
my @typesel = $o->{'types'} eq '*' ? () : split(/\s+/, $o->{'types'});
my @typeopts;
for (my $i = 0; $text{"type_$i"}; $i++) {
push(@typeopts, [ $i, $text{"type_$i"} ]);
}
print "</select></td>\n";
print &ui_table_row($text{'acl_types'},
&ui_radio("types_def", $o->{'types'} eq '*' ? 1 : 0,
[ [ 1, $text{'acl_all'} ],
[ 0, $text{'acl_sel'} ] ])."<br>\n".
&ui_select("types", \@typesel, \@typeopts, 5, 1),
3);
print "<td><b>$text{'acl_global'}</b></td> <td><select name=global>\n";
printf "<option value=1 %s>$text{'yes'}</option>\n",
$_[0]->{'global'} == 1 ? "selected" : "";
printf "<option value=2 %s>$text{'acl_htaccess'}</option>\n",
$_[0]->{'global'} == 2 ? "selected" : "";
printf "<option value=0 %s>$text{'no'}</option></select></td> </tr>\n",
$_[0]->{'global'} == 0 ? "selected" : "";
print "<tr> <td><b>$text{'acl_create'}</b></td> <td>\n";
printf "<input type=radio name=create value=1 %s> $text{'yes'}\n",
$_[0]->{'create'} ? "checked" : "";
printf "<input type=radio name=create value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'create'} ? "" : "checked";
print "<tr> <td><b>$text{'acl_vuser'}</b></td> <td>\n";
printf "<input type=radio name=vuser value=1 %s> $text{'yes'}\n",
$_[0]->{'vuser'} ? "checked" : "";
printf "<input type=radio name=vuser value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'vuser'} ? "" : "checked";
print "<tr> <td><b>$text{'acl_vaddr'}</b></td> <td>\n";
printf "<input type=radio name=vaddr value=1 %s> $text{'yes'}\n",
$_[0]->{'vaddr'} ? "checked" : "";
printf "<input type=radio name=vaddr value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'vaddr'} ? "" : "checked";
print "<tr> <td><b>$text{'acl_pipe'}</b></td> <td>\n";
printf "<input type=radio name=pipe value=1 %s> $text{'yes'}\n",
$_[0]->{'pipe'} ? "checked" : "";
printf "<input type=radio name=pipe value=0 %s> $text{'no'}</td>\n",
$_[0]->{'pipe'} ? "" : "checked";
print "<td><b>$text{'acl_stop'}</b></td> <td>\n";
printf "<input type=radio name=stop value=1 %s> $text{'yes'}\n",
$_[0]->{'stop'} ? "checked" : "";
printf "<input type=radio name=stop value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'stop'} ? "" : "checked";
print "<tr> <td><b>$text{'acl_apply'}</b></td> <td>\n";
printf "<input type=radio name=apply value=1 %s> $text{'yes'}\n",
$_[0]->{'apply'} ? "checked" : "";
printf "<input type=radio name=apply value=0 %s> $text{'no'}</td>\n",
$_[0]->{'apply'} ? "" : "checked";
print "<td><b>$text{'acl_names'}</b></td> <td>\n";
printf "<input type=radio name=names value=1 %s> $text{'yes'}\n",
$_[0]->{'names'} ? "checked" : "";
printf "<input type=radio name=names value=0 %s> $text{'no'}</td> </tr>\n",
$_[0]->{'names'} ? "" : "checked";
print "<tr> <td><b>$text{'acl_dir'}</b></td>\n";
printf "<td colspan=3><input name=dir size=30 value='%s'> %s</td> </tr>\n",
$_[0]->{'dir'}, &file_chooser_button("dir", 1);
print "<tr> <td><b>$text{'acl_aliasdir'}</b></td>\n";
printf "<td colspan=3><input name=aliasdir size=30 value='%s'> %s</td> </tr>\n",
$_[0]->{'aliasdir'}, &file_chooser_button("aliasdir", 1);
print "<tr> <td valign=top><b>$text{'acl_types'}</b></td>\n";
print "<td colspan=3>\n";
printf "<input type=radio name=types_def value=1 %s> $text{'acl_all'}&nbsp;\n",
$_[0]->{'types'} eq '*' ? "checked" : "";
printf "<input type=radio name=types_def value=0 %s> $text{'acl_sel'}<br>\n",
$_[0]->{'types'} eq '*' ? "" : "checked";
map { $types{$_}++ } split(/\s+/, $_[0]->{'types'});
print "<select name=types size=5 multiple>\n";
for($i=0; $text{"type_$i"}; $i++) {
printf "<option value=\"%d\" %s>%s</option>\n",
$i, $types{$i} ? "selected" : "", $text{"type_$i"};
}
print "</select></td> </tr>\n";
print "<tr> <td valign=top><b>$text{'acl_dirs'}</b></td>\n";
print "<td colspan=3>\n";
print &ui_radio("dirsmode", $_[0]->{'dirsmode'},
[ [ 0, $text{'acl_dirs0'} ],
[ 1, $text{'acl_dirs1'} ],
[ 2, $text{'acl_dirs2'} ] ]),"<br>\n";
print &ui_textarea("dirs", join("\n", split(/\s+/, $_[0]->{'dirs'})), 5, 50);
print "</td> </tr>\n";
print &ui_table_row($text{'acl_dirs'},
&ui_radio("dirsmode", $o->{'dirsmode'},
[ [ 0, $text{'acl_dirs0'} ],
[ 1, $text{'acl_dirs1'} ],
[ 2, $text{'acl_dirs2'} ] ])."<br>\n".
&ui_textarea("dirs", join("\n", split(/\s+/, $o->{'dirs'})), 5, 50),
3);
}
# acl_security_save(&options)
@@ -141,4 +110,3 @@ $_[0]->{'names'} = $in{'names'};
$_[0]->{'dirsmode'} = $in{'dirsmode'};
$_[0]->{'dirs'} = join(" ", split(/\s+/, $in{'dirs'}));
}

View File

@@ -12,7 +12,7 @@ $conf = &get_config();
&indexof($in{'file'}, @files) >= 0 || &error($text{'manual_efile'});
$temp = &transname();
&execute_command("cp ".quotemeta($in{'file'})." $temp");
&execute_command("cp ".quotemeta($in{'file'})." ".quotemeta($temp));
$in{'data'} =~ s/\r//g;
&lock_file($in{'file'});
&open_tempfile(FILE, ">$in{'file'}");
@@ -22,7 +22,7 @@ $in{'data'} =~ s/\r//g;
if ($config{'test_manual'}) {
$err = &test_config();
if ($err) {
&execute_command("mv $temp '$in{'file'}'");
&execute_command("mv ".quotemeta($temp)." ".quotemeta($in{'file'}));
&error(&text('manual_etest', "<pre>$err</pre>"));
}
}
@@ -30,4 +30,3 @@ unlink($temp);
&format_config_file($in{'file'});
&webmin_log("manual", undef, undef, { 'file' => $in{'file'} });
&redirect("index.cgi?mode=global");

View File

@@ -436,6 +436,13 @@ foreach $v (@virt) {
return \@get_config_cache;
}
# flush_config_cache()
# Delete all in-memory config caches
sub flush_config_cache
{
undef(@get_config_cache);
}
# get_config_file(filename, [&seen-files])
# Returns a list of config hash refs from some file
sub get_config_file
@@ -788,6 +795,428 @@ unlink($file);
&delete_webfile_link($file);
}
# can_manage_vhost_files()
# Returns 1 if this system uses Debian-style available/enabled site dirs
sub can_manage_vhost_files
{
return 0 if ($gconfig{'os_type'} ne 'debian-linux');
my $avail = &vhost_available_dir();
my $enabled = &vhost_enabled_dir();
return $avail && -d $avail && $enabled && -d $enabled &&
&simplify_path(&resolve_links($avail)) ne
&simplify_path(&resolve_links($enabled));
}
# vhost_available_dir()
# Returns the configured directory of available Apache virtual host files
sub vhost_available_dir
{
return $config{'virt_file'} ? &server_root($config{'virt_file'}) : undef;
}
# vhost_enabled_dir()
# Returns the configured directory of enabled Apache virtual host symlinks
sub vhost_enabled_dir
{
return $config{'link_dir'} ? &server_root($config{'link_dir'}) : undef;
}
# get_vhost_available_files()
# Returns real config files from the directory used for new virtual hosts
sub get_vhost_available_files
{
my @rv;
return @rv if (!&can_manage_vhost_files());
my $avail = &vhost_available_dir();
opendir(AVAIL, $avail) || return @rv;
foreach my $f (sort { lc($a) cmp lc($b) } readdir(AVAIL)) {
next if ($f eq "." || $f eq "..");
my $file = $avail."/".$f;
my $rfile = &simplify_path(&resolve_links($file));
next if (!$rfile || !-f $rfile || !-r $rfile);
push(@rv, $rfile);
}
closedir(AVAIL);
return &unique(@rv);
}
# find_virtuals_in_file(file)
# Returns VirtualHost blocks parsed from one config file
sub find_virtuals_in_file
{
my ($file) = @_;
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return ( ) if (!-r $rfile);
my @conf = &get_config_file($rfile);
return grep { $_->{'file'} eq $rfile }
&find_directive_struct("VirtualHost", \@conf);
}
# is_default_vhost(&virt)
# Returns 1 if a VirtualHost looks like a default/catch-all host
sub is_default_vhost
{
my ($virt) = @_;
return 1 if (!$virt);
return 1 if ($virt->{'value'} =~ /_default_/i);
return 1 if (!&find_directive("ServerName", $virt->{'members'}));
return 0;
}
# can_manage_vhost_file(file)
# Returns 1 if all virtual hosts in a file are manageable by this user
sub can_manage_vhost_file
{
my ($file) = @_;
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return 0 if (!$rfile || !-f $rfile || !-r $rfile);
my @virts = &find_virtuals_in_file($rfile);
return 0 if (!@virts);
foreach my $virt (@virts) {
return 0 if (&is_default_vhost($virt));
return 0 if (!&can_edit_virt($virt));
}
return 1;
}
# can_manage_vhost_state_file(file)
# Returns 1 if a virtual host file can have its enabled state managed here
sub can_manage_vhost_state_file
{
my ($file) = @_;
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return 0 if (!$rfile || !-f $rfile);
my %available = map { $_, 1 } &get_vhost_available_files();
return 0 if (!$available{$rfile});
return &can_manage_vhost_file($rfile);
}
# get_virtual_list_rows(&config)
# Returns row hashes for the virtual-host list, preserving sites-available order
sub get_virtual_list_rows
{
my ($conf) = @_;
my @active = grep { &can_edit_virt($_) }
&find_directive_struct("VirtualHost", $conf);
if (&can_manage_vhost_files()) {
my @rows;
my %active_by_file;
foreach my $v (@active) {
my $file = &simplify_path(&resolve_links($v->{'file'}));
$file ||= $v->{'file'};
push(@{$active_by_file{$file}}, $v);
}
my %done_virt;
foreach my $file (&get_vhost_available_files()) {
my @filevirts = @{$active_by_file{$file} || [ ]};
my $active = @filevirts ? 1 : 0;
if (!@filevirts) {
@filevirts = grep { &can_edit_virt($_) &&
!&is_default_vhost($_) }
&find_virtuals_in_file($file);
}
foreach my $v (@filevirts) {
push(@rows, { 'virt' => $v,
'active' => $active,
'file' => $file });
$done_virt{$v}++;
}
}
foreach my $v (@active) {
next if ($done_virt{$v});
push(@rows, { 'virt' => $v,
'active' => 1,
'file' => $v->{'file'} });
}
return @rows;
}
return map { { 'virt' => $_, 'active' => 1, 'file' => $_->{'file'} } }
@active;
}
# vhost_file_link(file)
# Returns the enabled symlink path for a virtual host file
sub vhost_file_link
{
my ($file) = @_;
return undef if (!&can_manage_vhost_files());
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
my $avail = &vhost_available_dir();
my $short;
if (opendir(AVAIL, $avail)) {
foreach my $f (sort { lc($a) cmp lc($b) } readdir(AVAIL)) {
next if ($f eq "." || $f eq "..");
my $afile = $avail."/".$f;
my $rafile = &simplify_path(&resolve_links($afile));
if ($rafile && $rafile eq $rfile) {
$short = $f;
last;
}
}
closedir(AVAIL);
}
$short ||= $rfile;
$short =~ s/^.*\///;
return &vhost_enabled_dir()."/".$short;
}
# vhost_file_links(file)
# Returns enabled symlinks for a virtual host file
sub vhost_file_links
{
my ($file) = @_;
my @rv;
return @rv if (!&can_manage_vhost_files());
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
my $enabled = &vhost_enabled_dir();
opendir(LINKDIR, $enabled) || return @rv;
foreach my $f (readdir(LINKDIR)) {
next if ($f eq "." || $f eq "..");
my $link = $enabled."/".$f;
next if (!-l $link);
my $rlink = &simplify_path(&resolve_links($link));
if ($rlink && $rlink eq $rfile) {
push(@rv, $link);
}
}
closedir(LINKDIR);
return @rv;
}
# vhost_file_enabled(file)
# Returns 1 if a virtual host file has an enabled symlink
sub vhost_file_enabled
{
my ($file) = @_;
return scalar(&vhost_file_links($file)) ? 1 : 0;
}
# enable_vhost_file(file)
# Enables a virtual host file and rolls back if apache configtest fails
sub enable_vhost_file
{
my ($file) = @_;
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return $text{'enable_efile'} if (!&can_manage_vhost_state_file($rfile));
my $verr = &virtualmin_vhost_file_state_error($rfile, "enable");
return $verr if ($verr);
my $link = &vhost_file_link($rfile);
$link || return $text{'enable_elinkdir'};
return undef if (&vhost_file_enabled($rfile));
if (-e $link || -l $link) {
return &text('enable_elinkexists', "<tt>".&html_escape($link)."</tt>");
}
&symlink_logged($rfile, $link) ||
return &text('enable_elink', "<tt>".&html_escape($link)."</tt>",
"<tt>".&html_escape($!)."</tt>");
my $err = &test_config();
if ($err) {
&unlink_logged($link);
return &text('enable_etest', "<tt>".&html_escape($err)."</tt>");
}
&flush_config_cache();
&update_last_config_change();
return undef;
}
# disable_vhost_file(file)
# Disables a virtual host file and rolls back if apache configtest fails
sub disable_vhost_file
{
my ($file) = @_;
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return $text{'enable_efile'} if (!&can_manage_vhost_state_file($rfile));
my $verr = &virtualmin_vhost_file_state_error($rfile, "disable");
return $verr if ($verr);
my @links = &vhost_file_links($file);
return undef if (!@links);
my @restore = map { [ $_, readlink($_) ] } @links;
my @removed;
foreach my $link (@links) {
if (!&unlink_logged($link)) {
foreach my $r (@removed) {
&symlink_logged($r->[1], $r->[0])
if (defined($r->[1]) && !-e $r->[0] && !-l $r->[0]);
}
return &text('enable_eunlink',
"<tt>".&html_escape($link)."</tt>",
"<tt>".&html_escape($!)."</tt>");
}
my ($restore) = grep { $_->[0] eq $link } @restore;
push(@removed, $restore) if ($restore);
}
my $err = &test_config();
if ($err) {
foreach my $r (@restore) {
&symlink_logged($r->[1], $r->[0])
if (defined($r->[1]) && !-e $r->[0] && !-l $r->[0]);
}
return &text('enable_etest', "<tt>".&html_escape($err)."</tt>");
}
&flush_config_cache();
&update_last_config_change();
return undef;
}
# virtualmin_available()
# Returns 1 if Virtualmin is installed and supported on this system
sub virtualmin_available
{
return $main::apache_virtualmin_available
if (defined($main::apache_virtualmin_available));
$main::apache_virtualmin_available = &foreign_check("virtual-server");
return $main::apache_virtualmin_available;
}
# virtualmin_domain_by_name(name)
# Returns a Virtualmin domain object by domain name, if one exists
sub virtualmin_domain_by_name
{
my ($name) = @_;
return undef if (!&virtualmin_available());
return $main::apache_virtualmin_domain_by_name_cache{$name}
if (exists($main::apache_virtualmin_domain_by_name_cache{$name}));
&foreign_require("virtual-server");
my $d = &virtual_server::get_domain_by("dom", $name);
$main::apache_virtualmin_domain_by_name_cache{$name} = $d;
return $d;
}
# virtual_names(&virt)
# Returns all hostnames from ServerName and ServerAlias directives
sub virtual_names
{
my ($virt) = @_;
my @rv;
my $sn = &find_directive("ServerName", $virt->{'members'});
push(@rv, $sn) if ($sn);
foreach my $sa (&find_directive_struct("ServerAlias", $virt->{'members'})) {
push(@rv, @{$sa->{'words'} || [ ]});
if (!@{$sa->{'words'} || [ ]} && $sa->{'value'}) {
push(@rv, $sa->{'value'});
}
}
return grep { $_ && $_ ne "*" } &unique(@rv);
}
# virtualmin_domain_for_vhost_file(file)
# Returns the Virtualmin domain object for a virtual host file, if any
sub virtualmin_domain_for_vhost_file
{
my ($file) = @_;
return undef if (!&virtualmin_available());
my $rfile = &simplify_path(&resolve_links($file));
$rfile ||= $file;
return $main::apache_virtualmin_domain_for_file_cache{$rfile}
if (exists($main::apache_virtualmin_domain_for_file_cache{$rfile}));
foreach my $virt (&find_virtuals_in_file($file)) {
next if (!&can_edit_virt($virt));
foreach my $name (&virtual_names($virt)) {
my $d = &virtualmin_domain_by_name($name);
if (!$d && $name =~ /^www\.(\S+)/i) {
$d = &virtualmin_domain_by_name($1);
}
if ($d) {
$main::apache_virtualmin_domain_for_file_cache{$rfile} = $d;
return $d;
}
}
}
$main::apache_virtualmin_domain_for_file_cache{$rfile} = undef;
return undef;
}
# vhost_file_state(file)
# Returns the effective enabled state for a virtual host file
sub vhost_file_state
{
my ($file) = @_;
my $d = &virtualmin_domain_for_vhost_file($file);
if ($d) {
return { 'enabled' => $d->{'disabled'} ? 0 : 1,
'source' => 'virtualmin',
'domain' => $d };
}
return { 'enabled' => &vhost_file_enabled($file) ? 1 : 0,
'source' => 'apache' };
}
# vhost_file_toggle_action(file)
# Returns the action needed to toggle a virtual host file's effective state
sub vhost_file_toggle_action
{
my ($file) = @_;
return &vhost_file_state($file)->{'enabled'} ? "disable" : "enable";
}
# virtualmin_domain_state_link(&domain, enabled?)
# Returns a link to the Virtualmin state change form for some domain
sub virtualmin_domain_state_link
{
my ($d, $enabled) = @_;
my $page = $enabled ? "disable_domain.cgi" : "enable_domain.cgi";
my $label = $enabled ? $text{'enable_virtualmin_disable_label'} :
$text{'enable_virtualmin_enable_label'};
my $url = "../virtual-server/".$page."?dom=".&urlize($d->{'id'});
return &ui_link(&quote_escape($url), "\"".$label."\"");
}
# virtualmin_vhost_file_state_error(file, action)
# Returns an error if a Virtualmin-owned site is being enabled or disabled here
sub virtualmin_vhost_file_state_error
{
my ($file, $action) = @_;
return undef if ($action ne "enable" && $action ne "disable");
my $state_info = &vhost_file_state($file);
return undef if ($state_info->{'source'} ne "virtualmin");
my $d = $state_info->{'domain'};
return undef if (!$d);
my $state = lc($state_info->{'enabled'} ? $text{'index_enabled'} :
$text{'index_disabled'});
my $dom = "<tt>".&html_escape($d->{'dom'})."</tt>";
my $link = &virtualmin_domain_state_link($d, $state_info->{'enabled'});
return $state_info->{'enabled'} ?
&text('enable_evirtualmin_disable', $dom, $state, $link) :
&text('enable_evirtualmin_enable', $dom, $state, $link);
}
# delete_virtuals_from_file(file, &virtualhosts...)
# Deletes VirtualHost blocks from one file and removes the file if empty
sub delete_virtuals_from_file
{
my ($file, @virts) = @_;
return 0 if (!@virts);
my $lref = &read_file_lines($file);
foreach my $virt (sort { $b->{'line'} <=> $a->{'line'} } @virts) {
my $len = $virt->{'eline'} - $virt->{'line'} + 1;
splice(@$lref, $virt->{'line'}, $len);
}
my $empty = 1;
foreach my $line (@$lref) {
if ($line =~ /\S/) {
$empty = 0;
last;
}
}
&flush_file_lines($file);
if ($empty) {
foreach my $link (&vhost_file_links($file)) {
&unlink_logged($link);
}
&unlink_logged($file);
}
&flush_config_cache();
&update_last_config_change();
return scalar(@virts);
}
# renumber(&config, line, file, offset)
# Recursively changes the line number of all directives from some file
# beyond the given line.
@@ -812,9 +1241,16 @@ foreach my $d (@$conf) {
# Convert a relative path to being under the server root
sub server_root
{
if (!$_[0]) { return undef; }
elsif ($_[0] =~ /^\//) { return $_[0]; }
else { return "$config{'httpd_dir'}/$_[0]"; }
my ($path) = @_;
if (!$path) {
return undef;
}
elsif ($path =~ /^\//) {
return $path;
}
else {
return "$config{'httpd_dir'}/$path";
}
}
sub dump_config
@@ -1432,7 +1868,7 @@ sub allowed_auth_file
local $_;
return 1 if ($access{'dir'} eq '/');
return 0 if ($_[0] =~ /\.\./);
local $f = &server_root($_[0], &get_config());
local $f = &server_root($_[0]);
return 0 if (-l $f && !&allowed_auth_file(readlink($f)));
local $l = length($access{'dir'});
return length($f) >= $l && substr($f, 0, $l) eq $access{'dir'};
@@ -1442,7 +1878,7 @@ return length($f) >= $l && substr($f, 0, $l) eq $access{'dir'};
# Returns 1 if the directory in some path exists
sub directory_exists
{
local $path = &server_root($_[0], &get_config());
local $path = &server_root($_[0]);
if ($path =~ /^(\S*\/)([^\/]+)$/) {
return -d $1;
}
@@ -1537,9 +1973,10 @@ return undef;
# if necessary.
sub before_changing
{
my @extra = grep { $_ } @_;
if ($config{'test_always'} || $access{'test_always'}) {
local $conf = &get_config();
local @files = &unique(map { $_->{'file'} } @$conf);
local @files = &unique((map { $_->{'file'} } @$conf), @extra);
local $/ = undef;
local $f;
foreach $f (@files) {
@@ -1618,7 +2055,7 @@ local $conf = &get_config();
local $pidfilestr = &find_directive_struct("PidFile", $conf);
local $pidfile = $pidfilestr ? $pidfilestr->{'words'}->[0]
: "logs/httpd.pid";
return &server_root($pidfile, $conf);
return &server_root($pidfile);
}
# restart_apache()
@@ -1803,8 +2240,8 @@ if (!&is_apache_running()) {
return $text{'start_eunknown'};
}
else {
$errorlog = &server_root($errorlog, $conf);
$out = `tail -5 $errorlog`;
$errorlog = &server_root($errorlog);
$out = &backquote_command("tail -5 ".quotemeta($errorlog));
return "$text{'start_eafter'} : <pre>$out</pre>";
}
}
@@ -1820,7 +2257,7 @@ local $conf = &get_config();
local $errorlogstr = &find_directive_struct("ErrorLog", $conf);
local $errorlog = $errorlogstr ? $errorlogstr->{'words'}->[0]
: "logs/error_log";
$errorlog = &server_root($errorlog, $conf);
$errorlog = &server_root($errorlog);
return $errorlog;
}
@@ -1962,10 +2399,11 @@ return @rv;
sub create_webfile_link
{
local ($file) = @_;
if ($config{'link_dir'}) {
my $linkdir = &vhost_enabled_dir();
if ($linkdir) {
local $short = $file;
$short =~ s/^.*\///;
local $linksrc = "$config{'link_dir'}/$short";
local $linksrc = "$linkdir/$short";
&lock_file($linksrc);
symlink($file, $linksrc);
&unlock_file($linksrc);
@@ -1978,16 +2416,16 @@ if ($config{'link_dir'}) {
sub delete_webfile_link
{
local ($file) = @_;
if ($config{'link_dir'}) {
local $short = $file;
$short =~ s/^.*\///;
opendir(LINKDIR, $config{'link_dir'});
$file = &simplify_path(&resolve_links($file));
my $linkdir = &vhost_enabled_dir();
if ($linkdir && opendir(LINKDIR, $linkdir)) {
foreach my $f (readdir(LINKDIR)) {
if ($f ne "." && $f ne ".." &&
(&simplify_path(
&resolve_links($config{'link_dir'}."/".$f)) eq $file ||
$short eq $f)) {
&unlink_logged($config{'link_dir'}."/".$f);
if ($f ne "." && $f ne "..") {
my $link = $linkdir."/".$f;
next if (!-l $link);
if (&simplify_path(&resolve_links($link)) eq $file) {
&unlink_logged($link);
}
}
}
closedir(LINKDIR);
@@ -2297,4 +2735,3 @@ sub clear_apache_modules_cache
}
1;

View File

@@ -14,23 +14,23 @@ push(@rv, map { $_->{'file'} } @$conf);
# Add mime types file
local $mfile = &find_directive("TypesConfig", $conf);
if (!$mfile) { $mfile = $config{'mime_types'}; }
if (!$mfile) { $mfile = &server_root("etc/mime.types", $conf); }
if (!-r $mfile) { $mfile = &server_root("conf/mime.types", $conf); }
if (!$mfile) { $mfile = &server_root("etc/mime.types"); }
if (!-r $mfile) { $mfile = &server_root("conf/mime.types"); }
if ($mfile) {
push(@rv, &server_root($mfile, $conf));
push(@rv, &server_root($mfile));
}
# Add mime magic file
local $magic = &find_directive("MimeMagicFile", $conf);
if ($magic) {
push(@rv, &server_root($magic, $conf));
push(@rv, &server_root($magic));
}
# Add all auth files
local $auth;
foreach $auth (&find_all_directives($conf, "AuthUserFile"),
&find_all_directives($conf, "AuthGroupFile")) {
push(@rv, &server_root($auth, $conf));
push(@rv, &server_root($auth));
}
return &unique(@rv);

View File

@@ -73,11 +73,12 @@ $rv = [ [ 'AccessFileName', 0, 5, 'virtual', undef, 5 ],
[ 'Options', 0, 5, 'virtual directory htaccess', undef, 3 ],
[ 'PidFile', 0, 9, 'global', -2.0 ],
[ 'Protocols', 0, 1, 'virtual', 2.4 ],
[ 'require', 0, 4, 'directory htaccess', undef, 6 ],
[ 'require', 0, 4, 'directory htaccess', '-2.4', 6 ],
[ 'Require allow deny order Satisfy', 1, 4, 'directory htaccess', 2.4, 6 ],
[ 'RLimitCPU', 0, 0, 'virtual', 1.2 ],
[ 'RLimitMEM', 0, 0, 'virtual', 1.2 ],
[ 'RLimitNPROC', 0, 0, 'virtual', 1.2 ],
[ 'Satisfy', 0, 4, 'directory htaccess', 1.2, 4 ],
[ 'Satisfy', 0, 4, 'directory htaccess', '1.2-2.4', 4 ],
[ 'ScoreBoardFile', 0, 9, 'global', '1.2-2.0' ],
[ 'SendBufferSize', 0, 1, 'global', -2.0 ],
[ 'ServerAdmin', 0, 1, 'virtual' ],
@@ -108,7 +109,7 @@ return ();
sub edit_MaxClients
{
return (1,
$text{'core_maxconc'},
&hlink($text{'core_maxconc'}, "MaxClients"),
&opt_input($_[0]->{'value'}, "MaxClients", $text{'core_default'}, 4));
}
sub save_MaxClients
@@ -117,6 +118,19 @@ return &parse_opt("MaxClients", '^\d+$',
$text{'core_emaxconc'});
}
sub edit_MaxRequestWorkers
{
return (1,
&hlink($text{'core_maxconc'}, "MaxRequestWorkers"),
&opt_input($_[0]->{'value'}, "MaxRequestWorkers",
$text{'core_default'}, 4));
}
sub save_MaxRequestWorkers
{
return &parse_opt("MaxRequestWorkers", '^\d+$',
$text{'core_emaxconc'});
}
sub edit_MaxKeepAliveRequests
{
return (1,
@@ -132,7 +146,7 @@ return &parse_opt("MaxKeepAliveRequests", '^\d+$',
sub edit_MaxRequestsPerChild
{
return (1,
$text{'core_maxreq'},
&hlink($text{'core_maxreq'}, "MaxRequestsPerChild"),
&opt_input($_[0]->{'value'}, "MaxRequestsPerChild", $text{'core_default'}, 5));
}
sub save_MaxRequestsPerChild
@@ -144,7 +158,7 @@ return &parse_opt("MaxRequestsPerChild", '^\d+$',
sub edit_MinSpareServers
{
return (1,
$text{'core_minspare'},
&hlink($text{'core_minspare'}, "MinSpareServers"),
&opt_input($_[0]->{'value'},"MinSpareServers",$text{'core_default'}, 4));
}
sub save_MinSpareServers
@@ -156,7 +170,7 @@ return &parse_opt("MinSpareServers", '^\d+$',
sub edit_MaxSpareServers
{
return (1,
$text{'core_maxspare'},
&hlink($text{'core_maxspare'}, "MaxSpareServers"),
&opt_input($_[0]->{'value'},"MaxSpareServers",$text{'core_default'}, 4));
}
sub save_MaxSpareServers
@@ -168,7 +182,7 @@ return &parse_opt("MaxSpareServers", '^\d+$',
sub edit_StartServers
{
return (1,
$text{'core_initial'},
&hlink($text{'core_initial'}, "StartServers"),
&opt_input($_[0]->{'value'}, "StartServers", $text{'core_default'}, 4));
}
sub save_StartServers
@@ -177,9 +191,70 @@ return &parse_opt("StartServers", '^\d+$',
$text{'core_einitial'});
}
sub edit_ServerLimit
{
return (1,
&hlink($text{'core_serverlimit'}, "ServerLimit"),
&opt_input($_[0]->{'value'}, "ServerLimit", $text{'core_default'}, 4));
}
sub save_ServerLimit
{
return &parse_opt("ServerLimit", '^\d+$',
$text{'core_eserverlimit'});
}
sub edit_MinSpareThreads
{
return (1,
&hlink($text{'worker_minspare'}, "MinSpareThreads"),
&opt_input($_[0]->{'value'},"MinSpareThreads",$text{'core_default'}, 4));
}
sub save_MinSpareThreads
{
return &parse_opt("MinSpareThreads", '^\d+$',
$text{'worker_eminspare'});
}
sub edit_MaxSpareThreads
{
return (1,
&hlink($text{'worker_maxspare'}, "MaxSpareThreads"),
&opt_input($_[0]->{'value'},"MaxSpareThreads",$text{'core_default'}, 4));
}
sub save_MaxSpareThreads
{
return &parse_opt("MaxSpareThreads", '^\d+$',
$text{'worker_emaxspare'});
}
sub edit_ThreadLimit
{
return (1,
&hlink($text{'worker_threadlimit'}, "ThreadLimit"),
&opt_input($_[0]->{'value'},"ThreadLimit",$text{'core_default'}, 4));
}
sub save_ThreadLimit
{
return &parse_opt("ThreadLimit", '^\d+$',
$text{'worker_ethreadlimit'});
}
sub edit_ThreadsPerChild
{
return (1,
&hlink($text{'worker_threads'}, "ThreadsPerChild"),
&opt_input($_[0]->{'value'},"ThreadsPerChild",$text{'core_default'}, 4));
}
sub save_ThreadsPerChild
{
return &parse_opt("ThreadsPerChild", '^\d+$',
$text{'worker_ethreads'});
}
sub edit_RLimitCPU
{
return &rlimit_input("RLimitCPU", $text{'core_cpulimit'}, $_[0]);
return &rlimit_input("RLimitCPU",
&hlink($text{'core_cpulimit'}, "RLimitCPU"), $_[0]);
}
sub save_RLimitCPU
{
@@ -188,7 +263,8 @@ return &parse_rlimit("RLimitCPU", $text{'core_cpulimit2'});
sub edit_RLimitMEM
{
return &rlimit_input("RLimitMEM", $text{'core_memlimit'}, $_[0]);
return &rlimit_input("RLimitMEM",
&hlink($text{'core_memlimit'}, "RLimitMEM"), $_[0]);
}
sub save_RLimitMEM
{
@@ -197,7 +273,8 @@ return &parse_rlimit("RLimitMEM", $text{'core_memlimit2'});
sub edit_RLimitNPROC
{
return &rlimit_input("RLimitNPROC", $text{'core_proclimit'}, $_[0]);
return &rlimit_input("RLimitNPROC",
&hlink($text{'core_proclimit'}, "RLimitNPROC"), $_[0]);
}
sub save_RLimitNPROC
{
@@ -958,6 +1035,234 @@ if ($in{'AuthType'}) { return ( [ $in{'AuthType'} ] ); }
else { return ( [ ] ); }
}
# parse_access_require_rule(value)
# Maps a Require line to a UI mode and value.
sub parse_access_require_rule
{
my ($value) = @_;
my $lv = lc($value);
return ('granted', '') if ($lv eq 'all granted');
return ('denied', '') if ($lv eq 'all denied');
return ('local', '') if ($lv eq 'local');
return ('valid-user', '') if ($lv eq 'valid-user');
return ('file-owner', '') if ($lv eq 'file-owner');
return ('file-group', '') if ($lv eq 'file-group');
if ($value =~ /^(ip|host|env|user|group|method|expr)\s+(.+)$/i) {
return (lc($1), $2);
}
return ('other', $value);
}
# legacy_access_rule_to_require(&directive)
# Converts a single Allow rule from legacy syntax to a Require mode/value pair.
sub legacy_access_rule_to_require
{
my ($dir) = @_;
my $what = join(" ", @{$dir->{'words'}});
$what =~ s/^from\s+//i;
return ('granted', '') if (lc($what) eq 'all');
return ('env', $1) if ($what =~ /^env=(\S+)$/i);
return ($what =~ /^[0-9a-f\.\:\/]+$/i ? 'ip' : 'host', $what);
}
# legacy_access_to_require_rules(&allow, &deny, &order)
# For the common Apache 2.4 cases, convert old Allow/Deny/Order rules to Require.
sub legacy_access_to_require_rules
{
my ($allow, $deny, $order) = @_;
my $orderv = @$order ? lc($order->[0]->{'value'}) : '';
# allow from all
if (@$allow == 1 && !@$deny && $allow->[0]->{'value'} =~ /^from\s+all$/i) {
return [ [ 'granted', '' ] ];
}
# deny from all
if (@$deny == 1 && !@$allow && $deny->[0]->{'value'} =~ /^from\s+all$/i) {
return [ [ 'denied', '' ] ];
}
# deny from all, then allow some specific requests
if ($orderv eq 'deny,allow' &&
@$deny == 1 &&
$deny->[0]->{'value'} =~ /^from\s+all$/i &&
@$allow) {
my @rv;
foreach my $dir (@$allow) {
push(@rv, [ &legacy_access_rule_to_require($dir) ]);
}
return \@rv;
}
return [ ];
}
# access_require_conf_root()
# Returns the outer-most config list that contains the current section.
sub access_require_conf_root
{
return $vconf if (defined($vconf));
return $hconf if (defined($hconf));
return $conf;
}
# access_require_container_info(&requires, &satisfy)
# Determines the current top-level Require container mode and rules.
sub access_require_container_info
{
my ($requires, $satisfy) = @_;
my @all = grep { $_->{'type'} } &find_directive_struct("RequireAll", $conf);
my @any = grep { $_->{'type'} } &find_directive_struct("RequireAny", $conf);
my @rules = @$requires;
my $mode = @$satisfy ? lc($satisfy->[0]->{'value'}) : 'default';
my $advanced = 0;
if (@all || @any) {
$advanced = 1 if (@all + @any > 1 || @$requires || @$satisfy);
my $container = @all ? $all[0] : $any[0];
$mode = @all ? 'all' : 'any';
@rules = ( );
foreach my $m (@{$container->{'members'}}) {
next if ($m->{'name'} eq 'dummy');
if ($m->{'type'} || lc($m->{'name'}) ne 'require') {
$advanced = 1;
next;
}
push(@rules, $m);
}
}
return ($mode, \@rules, $advanced);
}
sub edit_Require_allow_deny_order_Satisfy
{
my ($reqs, $allow, $deny, $order, $satisfy, $e) = @_;
my (@mode, @value);
my ($logic, $active_reqs, $advanced) =
&access_require_container_info($reqs, $satisfy);
foreach my $req (@$active_reqs) {
my ($m, $v) = &parse_access_require_rule($req->{'value'});
push(@mode, $m);
push(@value, $v);
}
my $has_legacy = @$allow || @$deny || @$order || @$satisfy;
if (!@mode && $has_legacy) {
foreach my $r (@{&legacy_access_to_require_rules($allow, $deny, $order)}) {
push(@mode, $r->[0]);
push(@value, $r->[1]);
}
}
push(@mode, "");
push(@value, "");
my $rv = "";
if ($has_legacy) {
$rv .= &ui_alert($text{'core_require_legacy'}, 'warning',
["fa-info-circle", "", 1],
{ style => "margin-bottom: 5px;" });
}
if ($advanced) {
$rv .= "<i>$text{'core_require_advanced'}</i><br>\n";
}
$rv .= "$text{'core_require_logic'} ".
&select_input($logic, "Require_logic", "default",
"$text{'core_require_logic_default'},default",
"$text{'core_require_logic_any'},any",
"$text{'core_require_logic_all'},all")."<br>\n";
$rv .= &ui_tag("div", "", { style => "height: 5px;" });
$rv .= "<table border>\n".
"<tr $tb> <td><b>$text{'core_require_type'}</b></td> ".
"<td><b>$text{'core_require_value'}</b></td> </tr>\n";
for(my $i=0; $i<@mode; $i++) {
$rv .= "<tr $cb>\n";
$rv .= "<td>".&select_input($mode[$i], "Require_mode_$i", "",
"$text{'default'},",
"$text{'core_require_granted'},granted",
"$text{'core_require_denied'},denied",
"$text{'core_require_local'},local",
"$text{'core_require_ip'},ip",
"$text{'core_require_host'},host",
"$text{'core_require_env'},env",
"$text{'core_require_user'},user",
"$text{'core_require_group'},group",
"$text{'core_require_validuser'},valid-user",
"$text{'core_require_fileowner'},file-owner",
"$text{'core_require_filegroup'},file-group",
"$text{'core_require_method'},method",
"$text{'core_require_expr'},expr",
"$text{'core_require_other'},other")."</td>\n";
$rv .= sprintf "<td><input name=Require_value_%d size=40 value=\"%s\"></td>\n",
$i, &html_escape($value[$i]);
$rv .= "</tr>\n";
}
$rv .= "</table>\n";
return (2, $text{'mod_access_restr'}, $rv);
}
sub save_Require_allow_deny_order_Satisfy
{
my (@req);
for(my $i=0; defined($in{"Require_mode_$i"}); $i++) {
my $mode = $in{"Require_mode_$i"};
my $value = $in{"Require_value_$i"};
$value =~ /\r|\n|\0/ && &error($text{'enewline'});
$value =~ s/^\s+//;
$value =~ s/\s+$//;
next if (!$mode && $value eq '');
$mode || &error($text{'core_require_etype'});
if ($mode eq 'granted') {
push(@req, "all granted");
}
elsif ($mode eq 'denied') {
push(@req, "all denied");
}
elsif ($mode eq 'local' ||
$mode eq 'valid-user' ||
$mode eq 'file-owner' ||
$mode eq 'file-group') {
push(@req, $mode);
}
elsif ($mode eq 'other') {
$value =~ /\S/ || &error($text{'core_require_evalue'});
push(@req, $value);
}
else {
$value =~ /\S/ || &error($text{'core_require_evalue'});
push(@req, "$mode $value");
}
}
my $logic = $in{'Require_logic'} || 'default';
my $root = &access_require_conf_root();
my @all = grep { $_->{'type'} } &find_directive_struct("RequireAll", $conf);
my @any = grep { $_->{'type'} } &find_directive_struct("RequireAny", $conf);
my @containers = (@all, @any);
if (@req && $logic ne 'default') {
my $new = {
'name' => $logic eq 'all' ? 'RequireAll' : 'RequireAny',
'value' => '',
'type' => 1,
'members' => [ map { {
'name' => 'Require',
'value' => $_,
'type' => 0,
} } @req ],
};
my $old = shift(@containers);
&save_directive_struct($old, $new, $conf, $root);
}
foreach my $c (@containers) {
&save_directive_struct($c, undef, $conf, $root);
}
return ( $logic eq 'default' ? \@req : [ ], [ ], [ ], [ ], [ ] );
}
sub edit_require
{
local($rv, $mode, $list);
@@ -1051,7 +1356,7 @@ return &parse_opt("LockFile", '^\S+', $text{'core_elock'});
sub edit_LimitRequestBody
{
return (1, $text{'core_maxbody'},
return (1, &hlink($text{'core_maxbody'}, "LimitRequestBody"),
&opt_input($_[0]->{'value'}, "LimitRequestBody", $text{'core_default'}, 8)
.&ui_space(2).$text{'bytes'});
}
@@ -1062,7 +1367,7 @@ return &parse_opt("LimitRequestBody", '^\d+$', $text{'core_ebody'});
sub edit_LimitXMLRequestBody
{
return (1, $text{'core_maxxml'},
return (1, &hlink($text{'core_maxxml'}, "LimitXMLRequestBody"),
&opt_input($_[0]->{'value'}, "LimitXMLRequestBody",
$text{'core_default'}, 8).&ui_space(2).$text{'bytes'});
}
@@ -1075,7 +1380,7 @@ return &parse_opt("LimitXMLRequestBody", '^\d+$', $text{'core_exml'});
sub edit_LimitRequestFields
{
return (1, $text{'core_maxhead'},
return (1, &hlink($text{'core_maxhead'}, "LimitRequestFields"),
&opt_input($_[0]->{'value'}, "LimitRequestFields", $text{'core_default'}, 6));
}
sub save_LimitRequestFields
@@ -1085,7 +1390,7 @@ return &parse_opt("LimitRequestFields", '^\d+$', $text{'core_ehead'});
sub edit_LimitRequestFieldsize
{
return (1, $text{'core_maxshead'},
return (1, &hlink($text{'core_maxshead'}, "LimitRequestFieldsize"),
&opt_input($_[0]->{'value'}, "LimitRequestFieldsize", $text{'core_default'}, 6));
}
sub save_LimitRequestFieldsize
@@ -1095,7 +1400,7 @@ return &parse_opt("LimitRequestFieldsize", '^\d+$', $text{'core_eshead'});
sub edit_LimitRequestLine
{
return (1, $text{'core_maxline'},
return (1, &hlink($text{'core_maxline'}, "LimitRequestLine"),
&opt_input($_[0]->{'value'}, "LimitRequestLine", $text{'core_default'}, 6));
}
sub save_LimitRequestLine
@@ -1402,4 +1707,3 @@ else { return ( [ ], [ ] ); }
}
1;

View File

@@ -119,8 +119,10 @@ elsif ($in{'fmode'} == 1) {
else {
# Use a user-specified file
$f = $in{'file'};
&allowed_auth_file($f) ||
&error(&text('cvirt_efile', &html_escape($f), $!));
}
-r $f || open(FILE, ">>$f") || &error(&text('cvirt_efile', &html_escape($f), $!));
-r $f || open(FILE, ">>", $f) || &error(&text('cvirt_efile', &html_escape($f), $!));
close(FILE);
&lock_apache_files();

View File

@@ -3,31 +3,107 @@
require './apache-lib.pl';
&ReadParse();
&error_setup($text{'delete_err'});
@d = split(/\0/, $in{'d'});
$file_action = $in{'toggle'} ? "toggle" : undef;
&error_setup($file_action ? $text{'enable_err'} : $text{'delete_err'});
$access{'vaddr'} || &error($text{'delete_ecannot'});
$conf = &get_config();
@d = split(/\0/, $in{'d'});
$can_vhost_files = &can_manage_vhost_files();
@d || &error($text{'delete_enone'});
if ($file_action) {
&can_manage_vhost_files() || &error($text{'enable_elinkdir'});
foreach $d (@d) {
if ($d =~ /^file\t([^\t]+)/) {
$file = $1;
}
elsif ($d !~ /^file\t/) {
($vmembers, $vconf) = &get_virtual_config($d);
next if (!$vconf || !&can_edit_virt($vconf));
$file = $vconf->{'file'};
}
else {
next;
}
$rfile = $file ? &simplify_path(&resolve_links($file)) : undef;
$files{$rfile}++ if ($rfile && -f $rfile &&
&can_manage_vhost_state_file($rfile));
}
@files = keys %files;
@files || &error($text{'enable_enone'});
foreach $file (@files) {
$action = &vhost_file_toggle_action($file);
$err = &virtualmin_vhost_file_state_error($file, $action);
$err && &error($err);
$file_actions{$file} = $action;
}
foreach $file (@files) {
$err = $file_actions{$file} eq "enable" ?
&enable_vhost_file($file) :
&disable_vhost_file($file);
$err && &error($err);
}
&webmin_log($file_action, "vhostfile", scalar(@files));
&redirect("");
exit;
}
if (!$in{'delete'}) {
&error($text{'delete_eaction'});
}
# Get them all
foreach $d (@d) {
if ($d =~ /^file\t([^\t]+)\t(\d+)$/) {
push(@{$file_lines{$1}}, $2);
next;
}
elsif ($d =~ /^file\t/) {
next;
}
($vmembers, $vconf) = &get_virtual_config($d);
$vconf || &error($text{'delete_egone'});
&can_edit_virt($vconf) || &error(&text('delete_ecannot2',
&virtual_name($vconf)));
$can_vhost_files && &is_default_vhost($vconf) &&
&error($text{'delete_edefault'});
push(@virts, $vconf);
}
if (%file_lines) {
foreach $file (keys %file_lines) {
$rfile = &simplify_path(&resolve_links($file));
next if (!$rfile || !-f $rfile ||
!&can_manage_vhost_state_file($rfile));
@fvirts = &find_virtuals_in_file($rfile);
foreach $line (@{$file_lines{$file}}) {
($vconf) = grep { $_->{'line'} == $line } @fvirts;
$vconf || &error($text{'delete_egone'});
&can_edit_virt($vconf) ||
&error(&text('delete_ecannot2',
&virtual_name($vconf)));
&is_default_vhost($vconf) &&
&error($text{'delete_edefault'});
push(@{$file_virts{$rfile}}, $vconf);
}
}
}
@virts || %file_virts || &error($text{'delete_enone'});
# Delete their structures
&before_changing();
&before_changing(keys %file_virts);
foreach $vconf (@virts) {
&lock_file($vconf->{'file'});
&save_directive_struct($vconf, undef, $conf, $conf);
&delete_file_if_empty($vconf->{'file'});
}
foreach $file (keys %file_virts) {
&lock_file($file);
$deleted += &delete_virtuals_from_file($file, @{$file_virts{$file}});
&unlock_file($file);
}
&flush_file_lines();
&unlock_all_files();
&update_last_config_change();
&after_changing();
&webmin_log("virts", "delete", scalar(@virts));
$deleted += scalar(@virts);
&webmin_log("virts", "delete", $deleted);
&redirect("");

View File

@@ -11,7 +11,8 @@ print $text{'defines_desc'},"<p>\n";
@defs = &get_httpd_defines(1);
if (@defs) {
print &text('defines_config',
"<tt><b>".join(" ", @defs)."</b></tt>"),"<p>\n";
"<tt><b>".&html_escape(join(" ", @defs))."</b></tt>"),
"<p>\n";
}
print &ui_form_start("save_defines.cgi", "post");

View File

@@ -22,13 +22,13 @@ print &ui_form_end([ [ "", $text{'save'} ] ]);
if ($in{'type'} == 6) {
$mfile = &find_directive("TypesConfig", $conf);
if (!$mfile) { $mfile = $config{'mime_types'}; }
if (!$mfile) { $mfile = &server_root("etc/mime.types", $conf); }
if (!-r $mfile) { $mfile = &server_root("conf/mime.types", $conf); }
$mfile = &server_root($mfile, $conf);
if (!$mfile) { $mfile = &server_root("etc/mime.types"); }
if (!-r $mfile) { $mfile = &server_root("conf/mime.types"); }
$mfile = &server_root($mfile);
print &ui_hr();
print &ui_subheading($text{'global_mime'});
print "$text{'global_mimedesc'}<p>\n";
@links = ( &ui_link("edit_gmime_type.cgi?file=$mfile",
@links = ( &ui_link("edit_gmime_type.cgi?file=".&urlize($mfile),
$text{'global_add'}) );
print &ui_links_row(\@links);
print &ui_columns_start([ $text{'global_type'},
@@ -41,7 +41,8 @@ if ($in{'type'} == 6) {
if (/^\s*(\S+)\s*(.*)$/) {
print &ui_columns_row([
&ui_link("edit_gmime_type.cgi?line=$line".
"&file=$mfile", $1), $2 ]);
"&file=".&urlize($mfile), &html_escape($1)),
&html_escape($2) ]);
}
$line++;
}

View File

@@ -5,9 +5,19 @@
require './apache-lib.pl';
&ReadParse();
$access{'global'}==1 || &error($text{'mime_ecannot'});
# Validate that the file parameter matches the actual MIME types file
$conf = &get_config();
$mfile = &find_directive("TypesConfig", $conf);
if (!$mfile) { $mfile = $config{'mime_types'}; }
if (!$mfile) { $mfile = &server_root("etc/mime.types", $conf); }
if (!-r $mfile) { $mfile = &server_root("conf/mime.types", $conf); }
$mfile = &server_root($mfile);
$in{'file'} eq $mfile || &error($text{'mime_ecannot'});
if (defined($in{'line'})) {
&ui_print_header(undef, $text{'mime_edit'}, "");
open(MIME, "<$in{'file'}");
open(MIME, "<", $in{'file'});
for($i=0; $i<=$in{'line'}; $i++) {
$line = <MIME>;
}

View File

@@ -0,0 +1,7 @@
<header>Tie virtual to child process</header>
The <tt>AssignUserId</tt> directive assigns a virtual host to a child process
running with the selected user ID and group ID for the legacy perchild MPM.
<p>
This directive is only available for Apache versions and MPMs that support
perchild.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Child process UID assignments</header>
The <tt>ChildPerUserId</tt> directive defines how many child processes should
run for a selected user ID and group ID in the legacy perchild MPM.
<p>
This directive is only available for Apache versions and MPMs that support
perchild.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Maximum request body size</header>
The <tt>LimitRequestBody</tt> directive sets the maximum allowed size of an HTTP
request body in bytes.
<p>
This can be used to limit upload or form submission size for the server,
virtual host, directory, or location where the directive is applied.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Maximum headers in request</header>
The <tt>LimitRequestFields</tt> directive sets the maximum number of HTTP
request header fields that Apache will accept.
<p>
Lowering this limit can reduce exposure to unusually large requests, but values
that are too low can reject legitimate clients.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Maximum request header size</header>
The <tt>LimitRequestFieldSize</tt> directive sets the maximum size of each HTTP
request header field in bytes.
<p>
Lowering this limit can reject oversized request headers, but values that are
too low can break clients that send larger cookies or authorization headers.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Maximum request line size</header>
The <tt>LimitRequestLine</tt> directive sets the maximum size of the HTTP
request line in bytes.
<p>
This line contains the method, requested URI, and HTTP protocol version. Values
that are too low can reject legitimate long URLs.
<p><footer>

View File

@@ -0,0 +1,6 @@
<header>Maximum XML request body size</header>
The <tt>LimitXMLRequestBody</tt> directive sets the maximum allowed size of an
XML request body in bytes.
<p>
It is mainly used by modules that parse XML request bodies, such as WebDAV.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Maximum simultaneous requests</header>
The <tt>MaxClients</tt> directive is the old Apache name for the maximum number
of requests that can be served at the same time. On Apache 2.4 and newer, the
equivalent directive is <tt>MaxRequestWorkers</tt>.
<p>
For prefork MPM, this limits child server processes. For threaded MPMs, it
limits the total number of worker threads across all child processes.
<p><footer>

View File

@@ -0,0 +1,9 @@
<header>Maximum simultaneous requests</header>
The <tt>MaxRequestWorkers</tt> directive sets the maximum number of requests
that Apache can serve at the same time. Requests above this limit wait until an
existing worker is free.
<p>
For prefork MPM, this limits child server processes. For threaded MPMs, it
limits the total number of worker threads across all child processes. Raising
this value may also require increasing <tt>ServerLimit</tt>.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Maximum requests per child process</header>
The <tt>MaxRequestsPerChild</tt> directive sets how many requests an Apache
child process will handle before it exits and is replaced. A value of
<tt>0</tt> means the process is not recycled because of this limit.
<p>
Recycling can help contain memory growth in long-running processes, but setting
this too low can create unnecessary process churn.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Maximum idle server processes</header>
The <tt>MaxSpareServers</tt> directive sets the maximum number of idle child
server processes Apache tries to keep when using prefork-style process
handling.
<p>
If more idle child processes are available, Apache stops some of them to avoid
keeping unnecessary processes running.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Maximum idle worker threads</header>
The <tt>MaxSpareThreads</tt> directive sets the maximum number of idle worker
threads Apache tries to keep when using a threaded MPM such as worker or event.
<p>
If more idle threads are available, Apache can reduce the number of running
workers instead of keeping excess capacity open.
<p><footer>

View File

@@ -0,0 +1,6 @@
<header>Maximum threads per child process</header>
The <tt>MaxThreadsPerChild</tt> directive sets the maximum number of worker
threads allowed in each child process for the legacy perchild MPM.
<p>
This directive only appears for Apache versions and MPMs that support perchild.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Minimum idle server processes</header>
The <tt>MinSpareServers</tt> directive sets the minimum number of idle child
server processes Apache tries to keep ready when using prefork-style process
handling.
<p>
If fewer idle child processes are available, Apache starts more so new
connections can be accepted without waiting for a process to be created.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Minimum idle worker threads</header>
The <tt>MinSpareThreads</tt> directive sets the minimum number of idle worker
threads Apache tries to keep ready when using a threaded MPM such as worker or
event.
<p>
If fewer idle threads are available, Apache starts or adjusts child processes
so new connections can be accepted without waiting for threads to become free.
<p><footer>

View File

@@ -0,0 +1,6 @@
<header>Number of child processes</header>
The <tt>NumServers</tt> directive sets the number of child server processes for
the legacy perchild MPM.
<p>
This directive only appears for Apache versions and MPMs that support perchild.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>CPU resource limit</header>
The <tt>RLimitCPU</tt> directive sets a CPU time resource limit for processes
started by Apache in this context, such as CGI programs where supported by the
operating system.
<p>
The soft limit is applied first. If a hard limit is also set, it is the maximum
value that the process can raise the soft limit to.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Memory resource limit</header>
The <tt>RLimitMEM</tt> directive sets a memory resource limit for processes
started by Apache in this context, such as CGI programs where supported by the
operating system.
<p>
The soft limit is applied first. If a hard limit is also set, it is the maximum
value that the process can raise the soft limit to.
<p><footer>

View File

@@ -0,0 +1,8 @@
<header>Process limit</header>
The <tt>RLimitNPROC</tt> directive sets a process count resource limit for
processes started by Apache in this context, such as CGI programs where
supported by the operating system.
<p>
The soft limit is applied first. If a hard limit is also set, it is the maximum
value that the process can raise the soft limit to.
<p><footer>

View File

@@ -0,0 +1,9 @@
<header>Server process limit</header>
The <tt>ServerLimit</tt> directive sets the hard upper limit on the number of
Apache child server processes. It caps values such as
<tt>MaxRequestWorkers</tt> for prefork MPM, and works with
<tt>ThreadsPerChild</tt> for threaded MPMs.
<p>
Increasing this value may require a full Apache stop and start before it takes
effect.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Server processes at startup</header>
The <tt>StartServers</tt> directive sets how many child server processes Apache
starts when the server first launches.
<p>
Apache adjusts the number of child processes after startup based on traffic and
the spare process or spare thread limits.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Initial threads per child process</header>
The <tt>StartThreads</tt> directive sets how many worker threads are created at
startup for legacy threaded MPMs that support this directive.
<p>
Apache may adjust the number of running workers after startup based on traffic
and the configured spare thread limits.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Thread limit per child process</header>
The <tt>ThreadLimit</tt> directive sets the hard upper limit for the number of
worker threads that can be configured in each child process.
<p>
It must be high enough for <tt>ThreadsPerChild</tt>. Increasing this value may
require a full Apache stop and start before it takes effect.
<p><footer>

View File

@@ -0,0 +1,7 @@
<header>Worker threads per child process</header>
The <tt>ThreadsPerChild</tt> directive sets how many worker threads Apache
creates in each child process when using a threaded MPM.
<p>
The total request capacity for threaded MPMs is controlled by this value
together with <tt>ServerLimit</tt> and <tt>MaxRequestWorkers</tt>.
<p><footer>

View File

@@ -102,6 +102,10 @@ if (&can_edit_virt()) {
push(@vproxy, undef);
$sn ||= &get_system_hostname();
push(@vurl, $defport ? "http://$sn:$defport/" : "http://$sn/");
push(@vfile, undef);
push(@vstatus, "");
push(@vsel, undef);
push(@vfilemanage, 0);
$showing_default++;
}
@@ -128,16 +132,23 @@ elsif ($httpd_modules{'core'} >= 1.2) {
$ba = &find_directive("ServerName", $conf);
$nv{&to_ipaddress($ba ? $ba : &get_system_hostname())}++;
}
@virt = grep { &can_edit_virt($_) } @virt;
$can_vhost_files = &can_manage_vhost_files();
@vrows = &get_virtual_list_rows($conf);
if ($config{'show_order'} == 1) {
# sort by server name
@virt = sort { &server_name_sort($a) cmp &server_name_sort($b) } @virt;
@vrows = sort { &server_name_sort($a->{'virt'}) cmp
&server_name_sort($b->{'virt'}) } @vrows;
}
elsif ($config{'show_order'} == 2) {
# sort by IP address
@virt = sort { &server_ip_sort($a) cmp &server_ip_sort($b) } @virt;
@vrows = sort { &server_ip_sort($a->{'virt'}) cmp
&server_ip_sort($b->{'virt'}) } @vrows;
}
foreach $v (@virt) {
@virt = map { $_->{'virt'} } grep { $_->{'active'} } @vrows;
%available_vhost_file = map { $_, 1 } &get_vhost_available_files()
if ($can_vhost_files);
foreach $r (@vrows) {
$v = $r->{'virt'};
$vm = $v->{'members'};
if ($v->{'words'}->[0] =~ /^\[(\S+)\]:(\d+)$/) {
# IPv6 address and port
@@ -163,7 +174,7 @@ foreach $v (@virt) {
$idx = &indexof($v, @$conf);
push(@vidx, $idx);
push(@vname, $text{'index_virt'});
push(@vlink, "virt_index.cgi?virt=$idx");
push(@vlink, $r->{'active'} ? "virt_index.cgi?virt=$idx" : undef);
$sname = &find_directive("ServerName", $vm);
local $daddr = $addr eq "_default_" ||
($addr eq "*" && $httpd_modules{'core'} < 1.2);
@@ -225,10 +236,34 @@ foreach $v (@virt) {
}
$sp = undef if ($sp == 80 && $prot eq "http" ||
$sp == 443 && $prot eq "https");
push(@vurl, $sp ? "$prot://$sn:$sp/" : "$prot://$sn/");
push(@vurl, $r->{'active'} ?
($sp ? "$prot://$sn:$sp/" : "$prot://$sn/") : undef);
local $rfile = $r->{'file'} ? &simplify_path(&resolve_links($r->{'file'}))
: undef;
push(@vfile, $rfile);
local $status = "";
if ($can_vhost_files && $rfile && $available_vhost_file{$rfile}) {
local $enabled = &vhost_file_state($rfile)->{'enabled'};
$status = $enabled ? $text{'index_enabled'} :
$text{'index_disabled'};
}
push(@vstatus, $status);
local $file_manage = $can_vhost_files && $rfile &&
$available_vhost_file{$rfile} &&
&can_manage_vhost_state_file($rfile);
push(@vfilemanage, $file_manage ? 1 : 0);
local $sel;
if ($r->{'active'} && (!$can_vhost_files || !&is_default_vhost($v))) {
$sel = $idx;
}
elsif (!$r->{'active'} && $can_vhost_files && $rfile &&
$available_vhost_file{$rfile} && $file_manage) {
$sel = "file\t".$rfile."\t".$v->{'line'};
}
push(@vsel, $sel);
}
if (@vlink == 1 && !$access{'global'} && $access{'virts'} ne "*" &&
if (@vlink == 1 && $vlink[0] && !$access{'global'} && $access{'virts'} ne "*" &&
!$access{'create'} && $access{'noconfig'}) {
# Can only manage one vhost, so go direct to it
&redirect($vlink[0]);
@@ -297,7 +332,9 @@ if ($access{'global'}) {
# work out select links
print &ui_tabs_start_tab("mode", "list");
#print $text{'index_desclist'},"<p>\n";
$showdel = $access{'vaddr'} && ($vidx[0] || $vidx[1]);
$showdel = $access{'vaddr'} &&
grep { defined($_) && $_ ne "" } @vsel;
$showtoggle = $can_vhost_files && grep { $_ } @vfilemanage;
@links = ( );
if ($showdel) {
push(@links, &select_all_link("d"),
@@ -326,8 +363,10 @@ if ($config{'max_servers'} && @vname > $config{'max_servers'}) {
}
elsif ($config{'show_list'} && scalar(@vname)) {
# as list for people with lots of servers
$list_form = "vhosts_form";
if ($showdel) {
print &ui_form_start("delete_vservs.cgi", "post");
print &ui_form_start("delete_vservs.cgi", "post", undef,
"id='$list_form'");
}
print &ui_links_row(\@links);
print &ui_columns_start([
@@ -337,19 +376,23 @@ elsif ($config{'show_list'} && scalar(@vname)) {
$text{'index_port'},
$text{'index_name'},
$text{'index_root'},
$can_vhost_files ? ( $text{'index_status'} ) : ( ),
$text{'index_url'} ], 100);
for($i=0; $i<@vname; $i++) {
local @cols;
push(@cols, &ui_link($vlink[$i], $vname[$i]) );
push(@cols, $vlink[$i] ? &ui_link($vlink[$i], $vname[$i]) :
$vname[$i] );
push(@cols, &html_escape($vaddr[$i]));
push(@cols, &html_escape($vport[$i]));
push(@cols, $vserv[$i] || $text{'index_auto'});
push(@cols, &html_escape($vproxy[$i]) ||
&html_escape($vroot[$i]));
push(@cols, &ui_link($vurl[$i], $text{'index_view'}) );
if ($showdel && $vidx[$i]) {
push(@cols, $vstatus[$i]) if ($can_vhost_files);
push(@cols, $vurl[$i] ? &ui_link($vurl[$i], $text{'index_view'}) :
"" );
if ($showdel && defined($vsel[$i]) && $vsel[$i] ne "") {
print &ui_checked_columns_row(\@cols, undef,
"d", $vidx[$i]);
"d", $vsel[$i]);
}
elsif ($showdel) {
print &ui_columns_row([ "", @cols ]);
@@ -361,13 +404,23 @@ elsif ($config{'show_list'} && scalar(@vname)) {
print &ui_columns_end();
print &ui_links_row(\@links);
if ($showdel) {
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
if ($showtoggle) {
print &ui_form_end_side_by_side($list_form,
[ [ "delete", $text{'index_delete'} ] ],
[ [ "toggle", $text{'index_toggle'}, undef,
undef, "form=\"$list_form\"" ] ]);
}
else {
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
}
}
}
else {
# as icons for niceness
$list_form = "vhosts_form";
if ($showdel) {
print &ui_form_start("delete_vservs.cgi", "post");
print &ui_form_start("delete_vservs.cgi", "post", undef,
"id='$list_form'");
}
print &ui_links_row(\@links);
print "<table width=100% cellpadding=5>\n";
@@ -376,8 +429,9 @@ else {
print '<div class="row icons-row inline-row">';
&generate_icon("images/virt.gif", $vname[$i], $vlink[$i],
undef, undef, undef,
$vidx[$i] && $access{'vaddr'} ?
&ui_checkbox("d", $vidx[$i]) : "");
defined($vsel[$i]) && $vsel[$i] ne "" &&
$access{'vaddr'} ?
&ui_checkbox("d", $vsel[$i]) : "");
print "</div>\n";
print "</td> <td valign=top>\n";
print "$vdesc[$i]<br>\n";
@@ -397,12 +451,24 @@ else {
print "<b>$text{'index_root'}</b> ",
&html_escape($vroot[$i]),"</td> </tr>\n";
}
if ($can_vhost_files && $vstatus[$i]) {
print "<tr><td colspan=2><b>$text{'index_status'}</b> ",
$vstatus[$i],"</td></tr>\n";
}
print "</table></td> </tr>\n";
}
print "</table>\n";
print &ui_links_row(\@links);
if ($showdel) {
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
if ($showtoggle) {
print &ui_form_end_side_by_side($list_form,
[ [ "delete", $text{'index_delete'} ] ],
[ [ "toggle", $text{'index_toggle'}, undef,
undef, "form=\"$list_form\"" ] ]);
}
else {
print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]);
}
}
}
print &ui_tabs_end_tab();
@@ -492,4 +558,3 @@ return $addr eq '_default_' || $addr eq '*' ? undef :
$addr =~ /^\[(\S+)\]$/ && &check_ip6address($1) ? $1 :
&to_ipaddress($addr);
}

View File

@@ -330,7 +330,7 @@ acl_types=أنواع التوجيه المتاحة
acl_all=الكل
acl_sel=المحدد ..
acl_names=يمكن تعديل أسماء الخادم؟
acl_dirs=Apache directives available<br><font size=-1>(Subject to types limit above)</font>
acl_dirs=توجيهات Apache المتاحة، وفقًا لأنواع التوجيهات المحددة أعلاه
acl_dirs0=الكل
acl_dirs1=المدرجة فقط ..
acl_dirs2=كل ما عدا المدرجة ..

View File

@@ -329,7 +329,7 @@ acl_types=Налични видове директиви
acl_all=Всички
acl_sel=Избрани..
acl_names=Може да редактира имена на сървъри?
acl_dirs=Достъпни директиви на Apache<br><font size=-1>(съгласно лимита на типове по-горе)</font>
acl_dirs=Налични директиви на Apache, ограничени от избраните по-горе типове директиви
acl_dirs0=Всички
acl_dirs1=Само изброените ..
acl_dirs2=Всички освен изброените ..

View File

@@ -329,7 +329,7 @@ acl_types=Tipus de directives disponibles
acl_all=Tots
acl_sel=Seleccionats...
acl_names=Pot editar els noms dels servidors
acl_dirs=Directives Apache disponibles<br><font size=-1>(Subjectes al límit de tipus superior)</font>
acl_dirs=Directives Apache disponibles, limitades pels tipus de directiva seleccionats a sobre
acl_dirs0=Totes
acl_dirs1=Només les llistades
acl_dirs2=Totes excepte les llistades

View File

@@ -320,7 +320,7 @@ acl_types=Typy direktiv k dispozici
acl_all=Všechny
acl_sel=Vybrané..
acl_names=Mohu upravovat názvy serverů?
acl_dirs=Direktivy Apache jsou přístupné<br><font size=-1>(Subject to types limit above)</font>
acl_dirs=Dostupné direktivy Apache, omezené typy direktiv vybranými výše
acl_dirs0=Vše
acl_dirs1=Jen vybrané ..
acl_dirs2=Vše kromě vybraných ..

View File

@@ -78,7 +78,7 @@ acl_types=Tilgængelige direktiv typer
acl_all=Alle
acl_sel=Valgte ..
acl_names=Kan redigere servernavne?
acl_dirs=Apache direktiver tilgængelige<br><font size=-1>(Subjekt tor type begrænsinger ovenfor)</font>
acl_dirs=Tilgængelige Apache-direktiver, begrænset af de direktivtyper, der er valgt ovenfor
acl_dirs0=Alle
acl_dirs1=Kun listede ..
acl_dirs2=Alle undtagen listede ..

Some files were not shown because too many files have changed in this diff Show More