diff --git a/src/hsts.c b/src/hsts.c index 4d748acc..a0087a6b 100644 --- a/src/hsts.c +++ b/src/hsts.c @@ -348,7 +348,15 @@ hsts_file_access_valid (const char *filename) if (stat (filename, &st) == -1) return false; - return !(st.st_mode & S_IWOTH) && S_ISREG (st.st_mode); + return +#ifndef WINDOWS + /* + * The world-writable concept is a Unix-centric notion. + * We bypass this test on Windows. + */ + !(st.st_mode & S_IWOTH) && +#endif + S_ISREG (st.st_mode); } /* HSTS API */