Giter Club home page Giter Club logo

webclient's Introduction

MEGA Web Client

MEGA provides robust cloud storage with convenient and powerful always-on privacy. MEGA believes in your right to privacy and provides you with the technology tools to protect it. We call it User Controlled Encryption (UCE), and it happens automatically.

Secure Boot

secureboot.js loads all the resources from static content servers and verifies its authenticity by checking the cryptographic hash.

Note: This is not the exact same secureboot.js as we have online at https://mega.nz/secureboot.js. We have an automatic process that generates secureboot.js with its cryptographic hashes and all the versioned resource files (file_X.js/file_X.html) as needed based on this repository before prior to updating the live site.

During development it's essential that your set the following localStorage parameters:

// Disables the cryptographic hash verification logic.
localStorage.dd = 1;

There are also various other localStorage parameters that are useful during development:

// Enables vanilla console logging.
localStorage.d = 1;
// Enables full console logging via MegaLogger.
localStorage.minLogLevel = 0;
// Allows you to disable the context menu in the FM for element inspection.
localStorage.contextmenu = 1;

Local webclient setup instructions for Ubuntu (for MEGAchat see INSTALL.md)

  1. Install Apache2:
sudo apt-get install apache2
  1. Create a new virtual host configuration file and edit it:
sudo nano /etc/apache2/sites-available/webclient.conf
  1. Add the following and save the file:
<VirtualHost *:80>
    ServerName webclient.local
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/webclient.local
    ErrorLog /var/log/apache2/webclient.local.error.log
    CustomLog /var/log/apache2/webclient.local.access.log combined
    LogLevel warn

    <Directory "/var/www/html/webclient.local">
        AllowOverride All
    </Directory>
</VirtualHost>
  1. Enable the config, also the rewrite and headers modules:
sudo a2ensite webclient.conf
sudo a2enmod rewrite
  1. Edit the hosts file:
sudo nano /etc/hosts
  1. Add the following and save the file:
127.0.0.1       webclient.local
  1. Restart the web server:
sudo systemctl restart apache2
  1. Clone the repository:
cd /var/www/html/
git clone [email protected]:web/webclient.git webclient.local
  1. Set permissions:
sudo chgrp -R www-data /var/www/html/
sudo chown -R <your-username> /var/www/html/
  1. Pull language files:
/var/www/html/webclient.local/scripts/lang.sh
  1. Visit http://webclient.local in your browser.

Directories

  • js/ -- contains all generic JavaScript files
  • html/ -- contains all generic HTML files
  • js/html/ contains all JavaScript files that belong to the specific HTML file of the parent folder
  • js/vendor/ -- contains all JavaScript files from external developers
  • cmaps/ -- contains all Character mapping files for Pdf preview's Adobe font

Our JavaScript Files

  • secureboot.js -- loads all the resources from static content servers and verifies its authenticity by checking the cryptographic hash
  • decrypter.js -- the decrypter which is used as a web worker to decrypt data while downloading
  • encrypter.js -- the encrypter which is used as a web worker to encrypt data while uploading
  • pdf.worker.js -- worker for PDF Reader in JavaScript, this is a fork, compare the changes
  • worker.sfuClient.bundle.js -- worker for MEGA SFU client for audio/video calls
  • js/avatar.js -- is used for avatar selection, cropping & scaling (all on the client side in the canvas)
  • js/cleartemp.js -- contains clearIt() which is used to purge temp data from the FileSystem API (Chrome only)
  • js/countries.js -- contains all the country names (we should translate these at some point)
  • js/crypto.js -- contains all the cryptographic functions & API handlers
  • js/download.js -- contains all the download logic
  • js/filedrag.js -- event handlers for the upload buttons, file&folder-drag&drop event handling for upload init.
  • js/filetypes.js -- contains all the supported file types based on the file extension to match icons
  • js/fm.js -- file manager core file, contains mainly file manager UI & dialog UI logic
  • js/functions.js -- contains some generic functions that are used throughout the site
  • js/keygen.js -- for cryptographic public/private key pair creation
  • js/mDB.js -- providers the local database abstraction layer for caching of meta-data in IndexedDB
  • js/mega.js -- MegaData class which does most of the data handling (but also some FM UI interaction)
  • js/mouse.js -- captures mouse events for entropy collection
  • js/notify.js -- contains the notifications logic
  • js/thumbnail.js -- client side canvas based thumbnail creation (because thumbnails are encrypted, too)
  • js/upload.js -- contains all the upload logic
  • js/account.js -- contains the user creation & login logic
  • js/zip.js -- JavaScript implementation to create ZIP archives of multiple files on the client side

Vendor JavaScript Files

  • aesasm.js -- general-purpose cryptographic library
  • rsaasm.js -- general-purpose cryptographic library
  • sjcl.js -- Stanford Javascript Crypto Library. This is a modified version with some minor changes, see c211e4ce and de5c3dce

See js/vendor/README.md for more.

webclient's People

Contributors

adymovich avatar agr-mega avatar alxvasilev avatar andreidymovich avatar andremeister avatar bfmega avatar bramvanderkolk avatar cr-nz avatar crodas avatar cttc1985 avatar davidc-mega avatar diegocr avatar diemax avatar georgezhum avatar ilp-mega avatar jtameganz avatar jya-mega avatar kevinchris17 avatar khaleddaifallah-mega avatar lpetrov avatar lw-mega avatar mega-sjr avatar mma-mega avatar ortmann avatar rr-mega avatar rt-mega avatar sabdol avatar velkoff avatar vibornoff avatar vincentguoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webclient's Issues

Repository error for Ubuntu 18.04

Code from synaptic:

Repository 'https://mega.nz/linux/MEGAsync/xUbuntu_18.04 ./ Release' changed its 'Origin' value from 'manual_build' to 'obs://private/DEB/xUbuntu_18.04'Repository 'https://mega.nz/linux/MEGAsync/xUbuntu_18.04 ./ Release' changed its 'Codename' value from 'Bionic' to 'xUbuntu_18.04'

I just disabled it for now to be able to update the rest of my distrib.

Guide remedy

I encountered this error: "An error occurred while loading MEGA. The file" http://eu.static.mega.co.nz/3/sjcl.js "is corrupt. Please try again later. We apologize for the inconvenience . " Now I want to fix how to do? Please reply me soon!

Downloading multiple folders in different tabs corrupts the resulting .zip files

I don't have a 100% safe way of reproducing it, but it has happened to me multiple times over many months. When I download different folders in different tabs, the resulting .zip files become corrupted and contain files from the other folder. I have just had this happen again and the .zip files are exactly the same size, down to the byte. They are corrupted in a way that will not allow them to be extracted (in windows at least).

Unfortunately I cannot share links to the folders I am talking about but as I said, this has happened multiple times over a long time span. I think you should be able to reproduce the issue if you try to reproduce it with sufficiently large folders (at least 100 MB, multiple files).

Repository broken Ubuntu 16.04

When trying to do an apt upgrade in Ubuntu 16.04 it shows the following error

Err:2 https://mega.nz/linux/MEGAsync/xUbuntu_16.04 ./ megasync 3.6.6+6.1
  404  Not Found

error install

npm ERR! [email protected] install: node install.js
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

Chrome - unable to download file in incognito because the browser automatically closes after ~1GB download

In the MEGA cloud I have an mp4 file with a size of 5.98 GB. I am downloading this file in incognito mode.
After ~1.10 GB has been downloaded, the browser exits automatically.
I confirmed the problem in:

  • Google Chrome 87.0.4280.88 64-bits (Windows 10 64 bit)
  • Edge 87.0.664.60 64-bits (Windows 10 64 bit)
  • Google Chrome 86.0.4240.111 (Linux Mint 20 64 bit)

image

Downloading large files from elsewhere does not cause this behavior.

If the problem occurs in download, it may also occur in upload mode incognito (I haven't checked it).

Feature request: remove files from the cloud without syncing the change to local devices

Hi,
I want to remove a file from my MEGA cloud without having the deletion synced to my devices.
Imagine I sync a large directory which -among others- contains some files and directories which I want to remove from my cloud but keep them in local storage (e.g. configuration data).
Currently, if I delete them from my cloud the change will be synced and the files and directories will be deleted from local storage.

I need the web-client to have an option which will allow the deletion and exclusion of selected files and directories from syncing ever again.
I need a server-side exclusion to be available from the context menu of the web-client.
Then, each MEGAsync-client, on any device, will not sync these files and directories. (it will not add them in the local exclusion-list, but it will just not upload them since the server will deny them)

The option of making local exclusions for each one of the multiple files and directories on each device is a time-consuming and complicated. It also results in a huge exclusion-list on each device which -especially with the current unscalable UI of the MEGAsync-app- is unmaintainable.

Can it be implemented?
Thanks in advance!

Enable download via Firefox and Safaria again

Hello guys,

first of all, I'd like to thank you for hosting my files :) I know this is quite expensive, therefore thanks to the donors!

I used Mega for providing providing film to juries. This worked great for a long time, but unfortunately people had problems with the browser's buffer. Now you ask the people to install the MEGAsync app when the file size is large. This is quite problematic for my use of MEGA since the app needs an account to work. That's why I'd be nice to make this checkbox unselectable again:

mega

$('.checkdiv.megaapp-download input').change(function() {

I think removing the else if condition would be sufficient for that.

$('.checkdiv.megaapp-download** input').change(function() {
                if ($(this).prop('checked')) {
                    checkMegaSyncDownload();
                    delete localStorage.megaSyncDownloadUnchecked;
                }
                else if (fdl_filesize > maxDownloadSize) {
                    checkMegaSyncDownload();
                    dlmanager.setBrowserWarningClasses('.download.warning-block');
                }
                else {
                    uncheckMegaSyncDownload();
                    localStorage.megaSyncDownloadUnchecked = 1;
                }
});

Meus Arquivos

Meus arquivos sumiram do nada, mandei várias mensagens pro suporte e até agora não tenho vê retorno

Keyboard usability issues

Keyboard interaction is very limited. In particular if you have a list, you cannot scroll it with the arrow keys as it should usually be.

For example as regards contacts, the arrow keys are totally disabled in the left panel. Selecting list view on the main panel, one can use the arrows, but up to the last visible list element, then the cursor goes off-screen. When you have a lot of contacts, scrolling with the arrows and select the items with the space is quite a productivity boost, particularly if you need to select people to send a group message.

Not need to say that for any productivity web app some sane keybindings are always welcomed.

Mega webclient won't start on Archlinux

I'm using Archlinux stable branch, this is my system info

┌————— [wyre] ————— [~] 
└▶ $ inxi -F
System:    Host: GibyArch Kernel: 4.14.15-1-ARCH x86_64 bits: 64 Desktop: Gnome 3.26.2 Distro: Arch Linux
Machine:   Device: desktop Mobo: Gigabyte model: GA-880GM-UD2H v: x.x serial: N/A BIOS: Award v: F8 date: 10/11/2010
CPU:       Quad core AMD Athlon II X4 640 (-MCP-) cache: 2048 KB
           clock speeds: max: 3000 MHz 1: 3000 MHz 2: 1800 MHz 3: 2300 MHz 4: 1800 MHz
Graphics:  Card: NVIDIA GK107 [GeForce GT 740]
           Display Server: x11 (X.Org 1.19.6 ) drivers: nvidia (unloaded: modesetting,vesa)
           Resolution: [email protected]
           OpenGL: renderer: GeForce GT 740/PCIe/SSE2 version: 4.5.0 NVIDIA 387.34
Audio:     Card-1 NVIDIA GK107 HDMI Audio Controller driver: snd_hda_intel Sound: ALSA v: k4.14.15-1-ARCH
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA) driver: snd_hda_intel
           Card-3 C-Media Audio Adapter (Unitek Y-247A) driver: USB Audio
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: enp2s0 state: up speed: 1000 Mbps duplex: full mac: 
           Card-2: Qualcomm Atheros AR2417 Wireless Network Adapter [AR5007G 802.11bg] driver: ath5k
           IF: wlp3s6 state: down mac: 
Drives:    HDD Total Size: 3000.6GB (34.9% used)
           ID-1: /dev/sdb model: ST2000DM001 size: 2000.4GB
           ID-2: /dev/sda model: ST1000DM003 size: 1000.2GB
Partition: ID-1: / size: 909G used: 685G (80%) fs: ext4 dev: /dev/sdb3
           ID-2: swap-1 size: 8.61GB used: 0.00GB (0%) fs: swap dev: /dev/sdb4
Sensors:   System Temperatures: cpu: 49.0C mobo: 34.0C gpu: 35C
           Fan Speeds (in rpm): cpu: 2836 fan-2: 0 fan-3: 0 fan-4: 1264
Info:      Processes: 251 Uptime: 25 min Memory: 6253.1/16041.4MB Client: Shell (bash) inxi: 2.3.56 

I've got megasync client even but browser cannot finish decrypting step as you can see in this pic:
captura de pantalla de 2018-01-31 20-59-22

My Chromium version is 64.0.3282.119-1 (Developers build) (64 bits); I've also tried using google-chrome (from AUR) but I get the same behavior, my Chrome version is 64.0.3282.119-1 also. Firefox do the same. I've tried some things like clean cache and cookies but doesn't work either.

Sorry if this is duplicated, thank you.

Local Storage/File Download isn't dumped

Everytime I download on the website version of MEGA, the files that I've downloaded stay inside my computer and don't get deleted until I manually delete them.

"Clear rubbish bin" option empties the bin but space is still shown as used

I had several sync debris in my account's rubbish bin; about 12% of my total space. After deleting everything, it still shows the space as used. I keep clearing the debris whenever the sync client creates them but both my dashboard info and the MegaSync client show the space used by the rubbish bin.

I'm using Firefox 51.0.1, 64bit, on macOS sierra, and MegaSync for macOS.

Keyboard shortcuts and video playback UX

Hey everyone, is there a way to disable shortcuts like CTRL + 1, CTRL + 2 and CTRL + 3?
For example, I sometimes play videos hosted on Mega and use these shortcuts for navigating between tabs, instead it seeks the video player to certain points of the video which is annoying.
To make the things worse, if the background of the video controls is white, times are basicly invisible.
I suggest applying a mild background gradient as a background on video controls.

Responsive Web

Hello,

Can You please improve web to responsive design. I don't like horizontal scroll bar,...

Feature request: CR3 Raw images support

Is there a way to add visualisation for raw picture files ?
I always shoot my photos in CR3 format and it would be great to visualise them directly in the mega client.

There are more raw image extensions here : https://en.wikipedia.org/wiki/Raw_image_format

Right now I have to download my folder and the sort the pictures that are on it (for those who were already uploaded in the past).

Ideias para melhor o app

Minhas ideias são de certa forma bem simpre , é porque como eu sou usuário do mega.nz a muito tempo percebi algumas coisas que podem ser melhoradas .

1 - disponibilizar a opção de download direto para o cartão SD , para celulares Galaxy A10 .

2 - Alimentar o limite de download gratuito pra 15 ou mais , é diminuir a tempo de conta esgotada de 3 horas ou mais , para 1 hora ou 30 minutos .

3 - caso o usuário tenha perdido a senha da conta é não ter salvado a chave de recuperação , voces poderia enviar email um e-mail com a opção de redefinição de senha mediante a resposta a uma pergunta .
Por exemplo :
A data de quando a conta foi aberta tipo , 11/02/2015 .

Essas foram a minhas ideias ,
Obrigado Pela Atenção .

A

Deleted

"Server received" and "Read receipts" for chat

Just like the Signal Messenger app does it, really helpful to know if once can leave a network area if the "server" has received the message" and then of course, if the recipient has as well when checking in on a conversation.

Emergency: Can't load mega

Hello @meganz,

Mega can't open by last two days. When I open mega.nz in my browser, it show me the error in the below screenshot.
Screenshot (493)

I use the latest version of Google Chrome Browser and windows 10 in my computer. Please fix it as soon as possible.

[UI] add dark theme

As the title says, please add the dark theme option so that it's easier on the eyes to use MEGA in dark environments.
Thanks in advance.

Remove "My chat files" folder

"My chat files" folder appears and sync each time I interact with the chat functionality. Ideally, the folder does not appear automatically until there is something to save (and configurable to where in settings).

Change folder icon / color

As a user I would like to be able to change the folder icon or at least that the whole folder color changed when applying a color label (not just a color dot).

Request: pdf preview

I'm using Mega to archive a lot of documents. I would love if Mega web client had a pdf preview mechanism, like in the screenshots of Google Drive, Dropbox and Copy.com below. It would make browsing and sharing docs so much easier.

Google Drive
Dropbox
Copy.com

ODF files preview

I'm using Mega to backup a lot of docs, I would love if Mega web client had a xls, doc, odt, ods, or in one word ODF preview mechanism, like in the Google Drive, Dropbox. below. It would make browsing and sharing docs will be much easier.

Thanks

nonfree licence

The licence of this project is nonfree. It's even debatable whether it qualifies as opensource wrt the OSI. I'd say no.

As such, I'm not even sure why this project is hosted on github, which is a collaboration platform.

No one is gonna work in an opensource collaboration manner on this project or even deploy it on his own servers, because he'll very likely violate the licence terms.

That also makes it hard to be recommended on prism-break.

[Enhancement] Emoji picker dialog in Conversations view should stay open after user selects an emoji

General Information

  • MEGA Version: 3.107.2

  • OS Version(s): Linux Mint 19.3 Xfce

  • Browser: Firefox 81.0.2

Enhancement

The emoji picker dialog (opened by clicking the emoji on the right end of the chat message box in Conversations view) gets automatically closed when user clicks one of the emojis. It used to be just a while ago that the dialog remained open, allowing user to select many emojis before closing up. I wish this behaviour would be returned how it was before.

Cant assess Mega.nz site

While loading site I am getting following error:

MEGA failed to load because of 

The file "js/mega-1_2e4865b0b16ebba28b0baf188175b9cb9cc07baf871d23a84890d261729ed97e.js" could not be loaded.

Please click OK to refresh and try again.

If the problem persists, please try disabling all third-party browser extensions, update your browser and MEGA browser extension to the latest version. If that does not help, contact [email protected]

BrowserID: mozilla/5.0 (windows nt 10.0; win64; x64; rv:66.0) gecko/20100101 firefox/66.0

Static server: https://sg.static.mega.co.nz/3/

Errors are not correctly reported

image

Actual error:
image

Happened to me while skipping through a video and I was able to reproduce it.

I'm not sure whether this is the correct repository - sorry if it isn't.

More detailed metadata for when using "Download your personal data"

When looking at the metadata, such as the files.json file, it's difficult to retrieve anything useful without some some work first.

The timestamp is in Unix, so I figured that out using a converting tool online. What do the link_identifier and node_identifier convert to though? Is it possible to retrieve file names?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.