Closed Bug 128697 Opened 22 years ago Closed 22 years ago

have to restart to get "cookie" prefs in Scripts and Windows working

Categories

(Core :: Security: CAPS, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: bugzilla, Assigned: security-bugs)

Details

(Whiteboard: patch, needs sr and a)

Attachments

(1 file)

you have to restart mozilla to get the "cookies" prefs in Edit -> Pref ->
Advanced -> Scripts and Windows working.

try having this local file and turn off "read cookie" without restarting.
<script>
document.writeln("before");
var dc = document.cookie;
document.writeln("after");
</script>

now try to restart and load the file again....

20020302
think this is prefs...
Assignee: trudelle → sgehani
Component: XP Apps → Preferences
No, this is CAPS.

Mitch, remember my question about dynamic changes to security policies?  Was
that ever addressed?  Is there an API that this pref panel should be calling to
resync security policies?
Assignee: sgehani → mstoltz
Severity: critical → major
Component: Preferences → Security: CAPS
OS: Windows 2000 → All
QA Contact: sairuh → bsharma
Hardware: PC → All
Hmm, that's odd. There is an API that this pref panel should be calling to
refresh caps settings, and I could have sworn I checked it in, but it's not
showing up in Bonsai so I guess it got left out somehow. I'll check it in.
Status: NEW → ASSIGNED
Critical Moz1.0 fixes
Keywords: nsbeta1
Target Milestone: --- → mozilla1.0
Comment on attachment 74011 [details] [diff] [review]
The forgotten part of the patch

r=bzbarsky
Attachment #74011 - Flags: review+
Whiteboard: patch, needs sr and a
Why can't this be done with pref observers? Seems like this is done the wrong
way around, or am I missing something?
Hmm, good point. There's a performance issue - the way I've written the new
policy tables, they can't be built up incrementally, they must be initialized
all at once. If we re-initialized after each pref change instead of once after
all pref changes, we'd be doing a lot of unnecessary work by repeatedly building
up and destroying the policy tables. I suppose we could get fancy, like this:

on pref change {
  dirty_bit = true;
}

on security check {
  if (dirty_bit)
    re-initialize tables
}

Do you think it's worth the effort and complexity to do it this way? Or should
we stick with the current patch? I don't anticipate these prefs being changed by
any callers other than this pref panel, although I suppose it's always possible.
  
We don't control the pref UI in all applications, so I would say that it's worth
the trouble to do what you suggested above.
Oh, OK. It means adding an additional if() clause to each security check, but I
suppose the performance impact will be minimal. 
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
v 20020326
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: