1 2 Previous Next 14 Replies Latest reply on Jan 30, 2015 12:05 PM by trishoar

    Blocking HTML objects in Facebook for example

    kbolt

      Hello all, I've been experimenting with MWG 7.4.2.2 and management has asked me to allow some aspects of time wasting sites, like Facebook like some basic communication and socializing which would be subject to schedules and quotas in other rules. I want to be able to block content at the level of HTML objects, so I was wondering if I'd be able to say, block Flash or specific parts of a webpage, a picture, a frame, for example. This would begin with Facebook but would really expand into other websites that some employees should have controlled access to so I'm trying to read up on the implementation now.

       

      I've found great documentation regarding major topics in MWG but I haven't seen one talking specifically about HTML object filtering yet, or maybe I missed it. Is it a feasible solution? Is it even possible? I would appreciate any help I can get.

        • 1. Re: Blocking HTML objects in Facebook for example
          trishoar

          Hi,

           

          Yep, HTML filtering is possible. Here is an example rule I've created to block YouTube Comments.

          Capture.PNG

          I would also look at application control, as there are a load of predefined rules for managing Facebook in there.

           

          Tris

          • 2. Re: Blocking HTML objects in Facebook for example
            kbolt

            Thank you for the quick reply. I've been messing with HTMLElement since then with Remove Facebook Chat ruleset as shown below:
            MWG_FB.PNG

             

            The disabled rules "Remove Facebook Sidebar" and "Remove Facebook Chat Tab" are the default rules, and I've added the "Remove Object Test" in order to continue testing the rule. These rules have not been working for me at all though.

             

            I used the Rule tracing central tool and found that the request does hit the Remove Facebook Chat ruleset, then the Enable HMTL Opener and the Remove Header rules below it as shown:

            FB Chat Not Hitting.PNG

             

            As you can see below, the HTMLElement.Attribute("id") matches *pagelet_chat*, HTMLElement.Attribute("id") matches *pagelet_sidebar* and HTMLElement.Name equals "div" all result in blank values and false so the actions for those rules aren't being executed.
            FB Sidebar Fail.PNG

            FB Chat Fail.PNG

            My Own Test Fail.PNG

            I'm not entirely sure why these criteria are missing, can anyone point me in the right direction regarding this?

            • 3. Re: Blocking HTML objects in Facebook for example
              kbolt

              trishoar When I tried to mimic your ruleset, the same result occurred i.e. HTMLElement.Name="div" criteria is not met because the HTMLElement.Name property returns a blank value.

              • 4. Re: Blocking HTML objects in Facebook for example
                trishoar

                Hi,

                 

                Sorry, forgot to include a screen shot of the HTML Opener config.

                Capture.PNG

                That might explain why it is not opening the div.

                 

                Tris

                • 5. Re: Blocking HTML objects in Facebook for example
                  kbolt

                  HTML Opener Settings.PNG


                  I also had that in my settings list but no dice.

                  • 6. Re: Blocking HTML objects in Facebook for example
                    kbolt

                    Would it be possible for you to show me a capture of your above rule working? I'm trying to see if I'm reading the engine trace logs incorrectly or not.This is really confusing.

                    • 7. Re: Blocking HTML objects in Facebook for example
                      trishoar

                      Hi,

                       

                      I think I see the problem. you are not scanning Embedded objects: it should look like this.

                      Capture.PNG

                      in your second post Embedded Objects is greyed out meaning it is disabled. With out this it is not scanning the objects returned from the server.

                       

                      Here is a screen shot of my rule tracing.

                      Capture.PNG

                       

                      Also, when I was originally developing this policy I used a copy of the MWG config which eelsasser created to demo what MWG 7.4.2 can do. You can download a copy of this config from MWG-PreConfig - Box the file is called PreConfig.7.4.2.5.0-18614.v1.3.2014-12-03.backup. If you put it on to a test server there is a really good example of what you are trying to do using Facebook included. It also has lots of other neat features and is a good starting point for if you want to see some of the other things MWG can do.

                      @

                      Tris

                      • 8. Re: Blocking HTML objects in Facebook for example
                        kbolt

                        You, sir, are a genius! That never occurred to me because I saw the "Embedded Objects" greyed out AND selected. I assumed it was already scanning Embedded Objects and that I couldn't change it. I've finally been able to remove the YouTube comment section so I'll apply the same to other HTML elements. Thank you very much!

                         

                        One thing leaves me confused though, when the rule removing the HTML element is above the Common Rules ruleset, the Embedded Objects option is greyed out but when I move it below it it then becomes accessible. I've been looking at the rules in Common Rules but none of them seem to do anything specific regarding Embedded Objects.

                        • 9. Re: Blocking HTML objects in Facebook for example
                          kbolt

                          One more thing, using your Remove YouTube Comment section ruleset seems to fail if a user goes to video then selects a video from the list of videos to the side. HTMLElement.Name="div" returns a false, but if you refresh the page it works fine.

                          1 2 Previous Next