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 {
|
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) {
|
if fname.starts_with(first) && fname.ends_with(last) {
|
||||||
match f.path().canonicalize() {
|
match f.path().canonicalize() {
|
||||||
|
|
|
@ -19,8 +19,8 @@ pub struct AuthSuccess {
|
||||||
|
|
||||||
fn token() -> String {
|
fn token() -> String {
|
||||||
// TODO should probably use crypto-safe rng
|
// TODO should probably use crypto-safe rng
|
||||||
rand::thread_rng()
|
rand::rng()
|
||||||
.sample_iter(&rand::distributions::Alphanumeric)
|
.sample_iter(&rand::distr::Alphanumeric)
|
||||||
.take(128)
|
.take(128)
|
||||||
.map(char::from)
|
.map(char::from)
|
||||||
.collect()
|
.collect()
|
||||||
|
|
Loading…
Add table
Reference in a new issue