UCP broken due to corrupted JS files

Every so often, I try to log into the UCP and I get cloud with a gear (the loading indicator) that never goes away. I check the JS console and see some errors. It turns out that one or more of the JS files is corrupted. About half way through the file there is a bunch of random garbage that doesn’t belong there. I check the file on the server disk, and it’s fine. So, somehow it’s being corrupted in transit.

Today when it happened I noticed that some of the random garbage actually looked like PHP code. Has anyone seen anything like this? Any ideas on what’s causing it? The only solution I have found is a full server reboot.

Example corrupted file

Here is a section of this file: /ucp/assets/js/compiled/main/jsphpg_a84f8885e18c7255b6baebc581baad46.js?load_version=v14.0.3.3

The PHP code that’s showed up and definitely doesn’t belong looks like it’s from libphonenumber-for-php. That library is used in many locations, for example: /var/www/html/admin/modules/vqplus/vendor/giggsey/libphonenumber-for-php/src/geocoding/data/zh/86155.php

function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),l=Math.min(s,n,o),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-o)/h+360:n===r?60*(o-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==a?1:a]
},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,nu  861552657 => 'å‰æž—çœå‰æž—市',
  861552658 => 'å‰æž—çœå››å¹³å¸‚',
  861552659 => 'å‰æž—çœå››å¹³å¸‚',
  861552660 => 'å‰æž—çœé€šåŒ–市',
  861552661 => 'å‰æž—çœé€šåŒ–市',
  861552662 => 'å‰æž—çœé€šåŒ–市',
  861552663 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552664 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552665 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552666 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552667 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552668 => 'å‰æž—çœç™½åŸŽå¸‚',
  861552669 => 'å‰æž—çœç™½åŸŽå¸‚',
  86155267 => 'å‰æž—çœå»¶è¾¹æœé²œæ—自治州',
  86155268 => 'å‰æž—çœé•¿æ˜¥å¸‚',
  861552690 => 'å‰æž—çœè¾½æºå¸‚',
  861552691 => 'å‰æž—çœè¾½æºå¸‚',
  861552692 => 'å‰æž—çœç™½å±±å¸‚',
  861552693 => 'å‰æž—çœç™½å±±å¸‚',
  861552694 => 'å‰æž—çœç™½åŸŽå¸‚',
  861552695 => 'å‰æž—çœç™½åŸŽå¸‚',
  861552696 => 'å‰æž—çœç™½å±±å¸‚',
  861552697 => 'å‰æž—çœæ¾åŽŸå¸‚',
  861552698 => 'å‰æž—çœæ¾åŽŸå¸‚',
  861552699 => 'å‰æž—çœæ¾åŽŸå¸‚',
  8615527 => '湖北çœæ­¦æ±‰å¸‚',
  86155280 => 'å››å·çœæˆéƒ½å¸‚',
  86155281 => 'å››å·çœæˆéƒ½å¸‚',
  86155282 => 'å››å·çœæˆéƒ½å¸‚',
  86155283 => 'å››å·çœæˆéƒ½å¸‚',
  86155284 => 'å››å·çœæˆéƒ½å¸‚',
  86155285 => 'å››å·çœç»µé˜³å¸‚',
  861552860 => 'å››å·çœå—充市',
  861552861 => 'å››å·çœå—充市',
  861552862 => 'å››å·çœé›…安市',
  861552863 => 'å››å·çœé›…安市',
  861552864 => 'å››å·çœé›…安市',
  861552865 => 'å››å·çœé›…安市',
  861552866 => 'å››å·çœå·´ä¸­å¸‚',
  861552867 => 'å››å·çœå·´ä¸­å¸‚',
  861552868 => 'å››å·çœèµ„阳市',
  861552869 => 'å››å·çœèµ„阳市',
  861552870 => 'å››å·çœå®œå®¾å¸‚',
  861552871 => 'å››å·çœå®œå®¾å¸‚',
  861552872 => 'å››å·çœå®œå®¾å¸‚',
  861552873 => 'å››å·çœå®œå®¾å¸‚',
  861552874 => 'å››å·çœå®œå®¾å¸‚',
  861552875 => 'å››å·çœä¹å±±å¸‚',
  861552876 => 'å››å·çœä¹å±±å¸‚',
  861552877 => 'å››å·çœä¹å±±å¸‚',
  861552878 => 'å››å·çœä¹å±±å¸‚',
  861552879 => 'å››å·çœæˆéƒ½å¸‚',
  861552880 => 'å››å·çœå—充市',
  861552881 => 'å››å·çœå—充市',
  861552882 => 'å››å·çœå—充市',
  861552883 => 'å››å·çœå—充市',
  861552884 => 'å››å·çœå—充市',
  861552885 => 'å››å·çœå—充市',
  861552886 => 'å››å·çœèµ„阳市',
  861552887 => 'å››å·çœè¾¾å·žå¸‚',
  861552888 => 'å››å·çœè¾¾å·žå¸‚',
  861552889 => 'å››å·çœç”˜å­œè—æ—自治州',
  861552890 => 'å››å·çœé›…安市',
  861552891 => 'å››å·çœé›…安市',
  861552892 => 'å››å·çœå·´ä¸­å¸‚',
  861552893 => 'å››å·çœå·´ä¸­å¸‚',
  861552894 => 'å››å·çœå·´ä¸­å¸‚',
  861552895 => 'å››å·çœå®œå®¾å¸‚',
  861552896 => 'å››å·çœå®œå®¾å¸‚',
  861552897 => 'å››å·çœå®œå®¾å¸‚',
  861552898 => 'å››å·çœå®œå®¾å¸‚',
  861552899 => 'å››å·çœå®œå®¾å¸‚',
  86155290 => '陕西çœè¥¿å®‰å¸‚',
  861552910 => '陕西çœå’¸é˜³å¸‚',
  861552911 => '陕西çœå»¶å®‰å¸‚',
  861552912 => '陕西çœæ¦†æž—市',
  861552913 => '陕西çœæ¸­å—市',
  861552914 => '陕西çœå•†æ´›å¸‚',
  861552915 => '陕西çœå®‰åº·å¸‚',
  861552916 => '陕西çœæ±‰ä¸­å¸‚',
  861552917 => '陕西çœå®é¸¡å¸‚',
  861552918 => '陕西çœå®é¸¡å¸‚',
  861552919 => '陕西çœé“œå·å¸‚',
  86155292 => '陕西çœè¥¿å®‰å¸‚',
  86155293 => '陕西çœè¥¿å®‰å¸‚',
  86155294 => '陕西çœè¥¿å®‰å¸‚',
  86155295 => '陕西çœè¥¿å®‰å¸‚',
  86155296 => '陕西çœè¥¿å®‰å¸‚',
  86155297 => '陕西çœæ¦†æž—市',
  86155298 => '陕西çœæ¦†æž—市',
  86155299 => '陕西çœæ¦†æž—市',
  86155300 => '河北çœé‚¯éƒ¸å¸‚',
  86155301 => '河北çœçŸ³å®¶åº„市',
  86155302 => '河北çœä¿å®šå¸‚',
  861553030 => '河北çœå¼ 家å£å¸‚',
  861553031 => '河北çœå¼ 家å£å¸‚',
  861553032 => '河北çœå¼ 家å£å¸‚',
  861553033 => '河北çœå¼ 家å£å¸‚',
  861553034 => '河北çœå¼ 家å£å¸‚',
  861553035 => '河北çœå”山市',
  861553036 => '河北çœå¼ 家å£å¸‚',
  861553037 => '河北çœå¼ 家å£å¸‚',
  861553038 => '河北çœå¼ 家å£å¸‚',
  861553039 => '河北çœå¼ 家å£å¸‚',
  86155304 => '河北çœæ²§å·žå¸‚',
  86155305 => '河北çœå”山市',
  86155306 => '河北çœå»ŠåŠå¸‚',
  86155307 => '河北çœæ²§å·žå¸‚',
  86155308 => '河北çœå”山市',
  86155309 => '河北çœé‚¢å°å¸‚lass:function(e,i,s,n,o){return t.effects.animateClass.call(

Update

I tried reinstalling ucp using: fwconsole ma downloadinstall ucp

I got a new corruption, this time with python code being dumped into the js file. My new theory is that somehow random chunks of recent memory are being injected into the files that apache is serving. Now I’m concerned that this might be some kind of a security breach. Thoughts?

p.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||th= head
            parent = None
            q = self.import_it(head, qname, parent)
            if q: return q, tail
        raise ImportError, "No module named '%s'" % qname

    def load_tail(self, q, tail):
        m = q
        while tail:
            i = tail.find('.')
            if i < 0: i = len(tail)
            head, tail = tail[:i], tail[i+1:]
            mname = "%s.%s" % (m.__name__, head)
            m = self.import_it(head, mname, m)
            if not m:
                raise ImportError, "No module named '%s'" % mname
        return m

    def ensure_fromlist(self, m, fromlist, recursive=0):
        for sub in fromlist:
            if sub == "*":
                if not recursive:
                    try:
                        all = m.__all__
                    except AttributeError:
                        pass
                    else:
                        self.ensure_fromlist(m, all, 1)
                continue
            if sub != "*" and not hasattr(m, sub):
                subname = "%s.%s" % (m.__name__, sub)
                submod = self.import_it(sub, subname, m)
                if not submod:
                    raise ImportError, "No module named '%s'" % subname

    def import_it(self, partname, fqname, parent, force_load=0):
        if not partname:
            # completely empty module name should only happen in
            # 'from . import' or __import__("")
            return parent
        if not force_load:
            try:
                return self.modules[fqname]
            except KeyError:
                pass
        try:
            path = parent and parent.__path__
        except AttributeError:
            return None
        partname = str(partname)
        stuff = self.loader.find_module(partname, path)
        if not stuff:
            return None
        fqname = str(fqname)
        m = self.loader.load_module(fqname, stuff)
        if parent:
            setattr(parent, partname, m)
        return m

    def reload(self, module):
        name = str(module.__name__)
        if '.' not in name:
            return self.import_it(name, name, None, force_load=1)
        i = name.rfind('.')
        pname = name[:i]
        parent = self.modules[pname]
        return self.import_it(name[i+1:], name, parent, force_load=1)


default_importer = None
current_importer = None

def install(importer = None):
    global current_importer
    current_importer = importer or default_importer or ModuleImporter()
    current_importer.install()

def uninstall():
    global current_importer
    current_importer.uninstall()
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������eld="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())})

Does anyone have any ideas or things I can try on this? I’m totally at a loss.

I’d try to completely remove UCP and re-install

fwconsole ma uninstall ucp
fwconsole ma delete ucp
fwconsole r

Re-install

fwconsole ma downloadinstall ucp --force
fwconsole r

Thanks for the suggestion! I’ll give it a try the next time I encounter this behavior.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.