aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/io/base_io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/io/base_io.rs')
-rw-r--r--crates/shirabe/src/io/base_io.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/shirabe/src/io/base_io.rs b/crates/shirabe/src/io/base_io.rs
index 4d0d9309..08a9fd7e 100644
--- a/crates/shirabe/src/io/base_io.rs
+++ b/crates/shirabe/src/io/base_io.rs
@@ -6,10 +6,9 @@ use crate::io::io_interface;
use crate::util::ProcessExecutor;
use crate::util::Silencer;
use indexmap::IndexMap;
-use shirabe_pcre::Preg;
use shirabe_php_shim::{
JSON_INVALID_UTF8_IGNORE, JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE, PhpMixed,
- UnexpectedValueException, array_merge, in_array_strict, json_encode_ex, php_regex,
+ UnexpectedValueException, array_merge, in_array_strict, json_encode_ex, php_regex, preg_match2,
};
/// ref: composer/vendor/psr/log/Psr/Log/LogLevel.php
@@ -157,7 +156,7 @@ pub trait BaseIO: IOInterface {
config.merge(&config_outer, "implicit-due-to-auth");
}
- if !Preg::is_match(php_regex!(r"{^[.A-Za-z0-9_]+$}"), &token_str) {
+ if preg_match2(php_regex!(r"{^[.A-Za-z0-9_]+$}"), &token_str, 0).is_none() {
return Err(UnexpectedValueException::new(format!(
"Your github oauth token for {} contains invalid characters: \"{}\"",
domain, token_str