[TODO]: Check and replace existing sed substitute statements with sedfile wrapper
Maintainer thường phản hồi trong vòng 1 ngày
@casperklein đang làm issue này rồi.
Từ ngày 9/6/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Subject
Something else that requires developers attention
Description
Description
This task is available for anyone that wants to tackle it.
sed substitution statements like sed -i 's/foo/bar/' somefile fail silently, when foo is not found.
This can lead to problems, when a file changed and the search pattern is not found anymore. If there is no explicit test for that, this bug will be unnoticed, until someone reports a problem, that is later tracked down to a sed statement, which no longer took place anymore.
Solution
The wrapper sedfile can replace sed -i [<other options>] <pattern> <file> statements. It checks the file before and after the substitution attempt. If no change is detected, it fails.
More information:
# Wrapper for 'sed -i': fail if file was not modified by sed and container was not restarted.
# Error output is suppressed, when container is restarted to avoid harmless error messages.
# Use "--strict" as first parameter, to fail regardless of the container state (fresh or restarted).
# When to use sedfile?
# Is a file change optional? --> use regular 'sed -i'
# Is a file change expected? --> use 'sedfile --strict -i'
# Is a file change only on the first container run expected? --> use 'sedfile -i'
Example
# Old
sed -i 's/^discard-all-mails=true/discard-all-mails=false/' important.config
# New
sedfile -i 's/^discard-all-mails=true/discard-all-mails=false/' important.config
Todo
Evaluate all sed substitution statements and check, if an sedfile wrapper usage makes sense.
- Ngôn ngữ chính
- Shell
- Star
- 19.7k
- Fork
- 2.1k
- Merge trung bình
- 22 giờ 39 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker-mailserver/docker-mailserver
-
bug report: Messages deleted from Junk get learnt as hamCó thể đã có người làm @georglauterbach đã nhận 2 ngày trước. Đang mởkind/bug/report meta/needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
docker-mailserver/docker-mailserver#4831 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug report: headers within signed section get modified resulting in invalid signatureCó thể đã có người làm @Vosjedev đã nhận 5 ngày trước. Đang mởarea/configuration (file) kind/bug/report meta/needs triage priority/high service/postfix
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
docker-mailserver/docker-mailserver#4830 · 1 bình luận · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
tracking: tackling the rising number of CVEsCó thể đã có người làm @casperklein đã nhận 15 ngày trước. Đang mởpriority/high
docker-mailserver/docker-mailserver#4822 · 13 bình luận · 5 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request: sign with relaxed/relaxed body canonicalization by defaultCó thể làm lại được @casperklein đã nhận 66 ngày trước và không có pull request nào đang mở. Đang mởarea/configuration (file) service/security/dkim-dmarc-spf stale-bot/ignore
docker-mailserver/docker-mailserver#4751 · 3 bình luận · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
other: ARC was marked as deprecated - meet DKIM2Có thể làm lại được @georglauterbach đã nhận 78 ngày trước và không có pull request nào đang mở. Đang mởarea/security kind/update meta/needs triage service/security/dkim-dmarc-spf stale-bot/ignore
docker-mailserver/docker-mailserver#4740 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker-mailserver/docker-mailserver
Issue tương tự
-
documentation good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
ysb3996-blip/oops#51 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdictCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởdocumentation severity: low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
luainkernel/lunatik#2231 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dataiku/kiji-proxy#668 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
diagnostics good first issue testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove leftover Cloud66 custom_web process from ProcfileCó thể đã có người làm @ShahadatTest đã nhận hôm nay. Đang mởDifficulty: Easy Good First Issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
rubyforgood/casa#7330 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày