Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [16.0.1] - 2026-09-29

### Bug Fixes

- Fix a bug due to unproper handling of UTF-8 characters in the policy parsing
that causes a runtime panic. The fix restricts the range of expressible
policies to the ones only using ASCII characters.

## [16.0.0] - 2026-02-13

### 🚀 Features
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmian_cover_crypt"
version = "16.0.0"
version = "16.0.1"
authors = [
"Théophile Brezot <theophile.brezot@cosmian.com>",
"Bruno Grieder <bruno.grieder@cosmian.com>",
Expand Down
6 changes: 6 additions & 0 deletions src/abe/policy/access_policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ impl AccessPolicy {
///
/// - "DPT::MKG DPT::FIN"
pub fn parse(mut e: &str) -> Result<Self, Error> {
if !e.is_ascii() {
return Err(Error::InvalidBooleanExpression(
"non-ascii character used".to_owned(),
));
}
let seeker = |c: &char| !"()|&".contains(*c);
let mut q = LinkedList::<Self>::new();
loop {
Expand Down Expand Up @@ -303,5 +308,6 @@ mod tests {
assert!(AccessPolicy::parse("D1").is_err());
assert!(AccessPolicy::parse("D1::A (&& D2::A || D2::B)").is_err());
assert!(AccessPolicy::parse("|| D2::B").is_err());
assert!(AccessPolicy::parse("(é::à && (ó::ï) || ø::ú)").is_err());
}
}
Loading