Skip to content

declare proc_dir earlier and resolve exact proc_dir#1001

Open
Riolku wants to merge 1 commit intoDMOJ:masterfrom
Riolku:declare-proc-dir
Open

declare proc_dir earlier and resolve exact proc_dir#1001
Riolku wants to merge 1 commit intoDMOJ:masterfrom
Riolku:declare-proc-dir

Conversation

@Riolku
Copy link
Contributor

@Riolku Riolku commented Feb 28, 2022

We can declare the proc directory earlier in the code and use it. We intentionally add a trailing slash on line 352, in case for instance, the process PID is 123 and they request /proc/12345. Finally, we add a check for the literal directory /proc/getpid()

@dmoj-build
Copy link
Collaborator

Can one of the admins verify this patch?

@kiritofeng
Copy link
Member

ok to test

We can declare the proc directory earlier in the code and use it. We 
intentionally add a trailing slash on line 352, in case for instance, 
the process PID is 123 and they request /proc/12345. Finally, we add a 
check for the literal directory /proc/getpid()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants