@@ -189,9 +189,8 @@ function evaluate(type, hostname) {
189
189
}
190
190
// indirect: any type, specific hostname
191
191
cellKey = '*/' + hostname ;
192
- if ( blacklist [ cellKey ] || ( ! graylist [ cellKey ] && blacklistReadonly [ hostname ] ) ) {
193
- return httpsb . DISALLOWED_INDIRECT ;
194
- }
192
+ // rhill 2013-10-26: Whitelist MUST be checked before blacklist,
193
+ // because read-only blacklists are, hum... read-only?
195
194
if ( whitelist [ cellKey ] ) {
196
195
// https://github.com/gorhill/httpswitchboard/issues/29
197
196
// The cell is indirectly whitelisted because of hostname, type
@@ -201,6 +200,9 @@ function evaluate(type, hostname) {
201
200
}
202
201
return httpsb . ALLOWED_INDIRECT ;
203
202
}
203
+ if ( blacklist [ cellKey ] || ( ! graylist [ cellKey ] && blacklistReadonly [ hostname ] ) ) {
204
+ return httpsb . DISALLOWED_INDIRECT ;
205
+ }
204
206
205
207
// indirect: parent hostname nodes
206
208
parent = hostname ;
@@ -219,9 +221,8 @@ function evaluate(type, hostname) {
219
221
}
220
222
// any type, specific parent
221
223
cellKey = '*/' + parent ;
222
- if ( blacklist [ cellKey ] || ( ! graylist [ cellKey ] && blacklistReadonly [ parent ] ) ) {
223
- return httpsb . DISALLOWED_INDIRECT ;
224
- }
224
+ // rhill 2013-10-26: Whitelist MUST be checked before blacklist,
225
+ // because read-only blacklists are, hum... read-only?
225
226
if ( whitelist [ cellKey ] ) {
226
227
// https://github.com/gorhill/httpswitchboard/issues/29
227
228
// The cell is indirectly whitelisted because of hostname, type
@@ -231,6 +232,9 @@ function evaluate(type, hostname) {
231
232
}
232
233
return httpsb . ALLOWED_INDIRECT ;
233
234
}
235
+ if ( blacklist [ cellKey ] || ( ! graylist [ cellKey ] && blacklistReadonly [ parent ] ) ) {
236
+ return httpsb . DISALLOWED_INDIRECT ;
237
+ }
234
238
}
235
239
// indirect: specific type, any hostname
236
240
if ( blacklist [ typeKey ] ) {
0 commit comments