This commit is contained in:
parent
4df61c3bfc
commit
9ecb095f46
2 changed files with 3 additions and 2 deletions
|
@ -75,6 +75,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "web")]
|
||||
fn if_matches_set_env_path(var: &str, f: &std::fs::DirEntry, fname: &str, first: &str, last: &str) -> bool {
|
||||
if fname.starts_with(first) && fname.ends_with(last) {
|
||||
match f.path().canonicalize() {
|
||||
|
|
|
@ -19,8 +19,8 @@ pub struct AuthSuccess {
|
|||
|
||||
fn token() -> String {
|
||||
// TODO should probably use crypto-safe rng
|
||||
rand::thread_rng()
|
||||
.sample_iter(&rand::distributions::Alphanumeric)
|
||||
rand::rng()
|
||||
.sample_iter(&rand::distr::Alphanumeric)
|
||||
.take(128)
|
||||
.map(char::from)
|
||||
.collect()
|
||||
|
|
Loading…
Add table
Reference in a new issue