Commit Graph

61 Commits

Author SHA1 Message Date
Mikael Korpela
28027290b5 Putting the head in order
- Moving a few meta tags+base tag before title. I've noticed Bootstrap [recommends this](http://getbootstrap.com/getting-started/#template) (wasn't sure why) so I did some quick googling and [IE seems to be the reason](http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx) but there some other speculations too. Feel free to search more.

- ...in any case, [charset tag should come before the title](http://www.w3.org/wiki/The_HTML_head_element#Stop_right_there.21_Inline_CSS_and_JavaScript_is_not_too_clever.21).

- Removing keyword tag since it [isn't really used anymore](https://chrisedwards.me/seo/keyword-meta-tag-google/).

- Removing duplicate Content-type/Encoding tag

- Remove IE shim
2015-07-25 02:47:17 +03:00
Ilan Biala
8a81cf0168 Merge pull request #688 from codydaig/bugfix/github_undefined_displayname
If displayName in GitHub is undefined use username
Fixes #519
2015-07-24 10:13:26 -04:00
Liran Tal
ac35f0fec8 adding couple more tests to confirm users model works as expected 2015-07-24 09:38:49 +03:00
Cody B. Daig
7605956c99 displayName undefined 2015-07-23 17:00:22 -07:00
Liran Tal
00a4c0603a Merge pull request #566 from simison/error-404-pages
#501 Handle 404 errors at Express backend and at Angular frontend
2015-07-20 22:25:33 +03:00
Liran Tal
82d2377754 Merge pull request #439 from igorauad/uniqueEmail
Make emails unique
2015-07-20 22:12:51 +03:00
Igor Freire
0efc82db0f Fix message catching the field for which a duplicate key error ocurred 2015-07-20 14:39:44 -03:00
Cody B. Daig
a8dae99173 Remove console.log from an article test 2015-07-20 10:04:45 -07:00
cdriscol
9e7239baf7 appending a base tag to the head before jasmine tests run. 2015-07-19 22:24:39 -06:00
Igor Freire
5d4d7cecfe Make emails unique
Emails are made unique. When user attempts to sign in through a provider in which his email is one that is already registered, user is redirected to the signin page with an error passed as a query string parameter.
2015-07-17 14:52:27 -03:00
git-admin
a23290b46e Use validator.js for email validation 2015-07-17 09:27:16 +02:00
trainerbill
a98a84fd20 Fix merge conflicts 2015-07-14 15:46:23 -05:00
Julien Mazé
c572ed7eec JSHint test failing because of missing semicolon
I just cloned the branch and both gulp and grunt fail on the lint task because of the missing semicolon.
2015-07-12 20:54:59 +02:00
Liran Tal
bf79c17bd0 updating the schema save pre hook so that it checks for a modified version of the password field before it tries to re-calculate the new password to save for the user model 2015-07-12 19:25:40 +03:00
Ryan Hutchison
786c546d84 Update users.authentication.server.controller.js 2015-07-09 15:44:38 -04:00
Ryan Hutchison
75c80524b7 remove unused dependcies. 2015-07-09 14:23:31 -04:00
Ryan Hutchison
16aa646673 Merge branch '0.4.0' of github.com:meanjs/mean into 0.4.0 2015-07-09 14:10:01 -04:00
Ryan Hutchison
d0bb4a3cd3 duplicate controller. This was moved under settings/ 2015-07-09 14:04:16 -04:00
Ryan Hutchison
b18a7dda99 bug: remove social account. 2015-07-09 13:49:48 -04:00
Ilan Biala
ade074cf37 Merge pull request #599 from loulin/0.4.0
Add return for done(err) in test
2015-07-09 13:32:27 -04:00
Ryan Hutchison
9e19493f50 Remove unused scope declarations. 2015-07-09 13:10:39 -04:00
Ryan Hutchison
b6818b63d3 fix btn-large class names. 2015-07-07 20:32:24 -04:00
Ryan Hutchison
67e38aec01 fix failing tests 2015-07-07 10:22:21 -04:00
Ryan Hutchison
9ca71c8cde remove href attribute. 2015-07-07 08:18:47 -04:00
Ryan Hutchison
73b5fa3df0 Revert "load bootstrap (doh)"
This reverts commit 7d8cea159b.
2015-07-07 08:18:38 -04:00
Ryan Hutchison
30c916030e setup dropdown menu 2015-07-05 17:51:04 -04:00
Liran Tal
d5b22e35c4 addressing missing newlines and node 0.12 version for travis-ci 2015-07-05 01:12:54 +03:00
Liran Tal
52fe443429 fixing err object which isnt present in this check, replacing it with a text message 2015-07-03 10:48:06 +03:00
Liran Tal
834bfd6cf8 removing left-overs of merge diff from 0.4 to master 2015-07-03 07:51:08 +03:00
Andrew Throener
8694b7e976 PayPal Authentication 2015-07-02 07:44:58 -05:00
Liran Tal
67e96a4f22 0.4.0 branch merged into master 2015-07-02 12:08:09 +03:00
loulin
d00f4ce0cc should return done(err) in article server route test 2015-06-30 11:15:52 +08:00
cdriscol
2a3516e2a6 Removing target on signin and signup anchors to prevent a complete page reload when changing to those states. 2015-06-03 21:44:40 -06:00
Ilan Biala
b1d95e0a34 Merge pull request #582 from simison/patch-9
Fix deprecated ExpressJS req.param('provider')
2015-06-03 19:41:35 -04:00
Ilan Biala
cd5db4ad4d Merge pull request #575 from pgrodrigues/0.4.0
Abstract the local strategy login error to thwart hackers
2015-06-03 19:39:19 -04:00
Mikael Korpela
10d35d1df9 Fix deprecated ExpressJS req.param('provider')
>"Deprecated. Use either req.params, req.body or req.query, as applicable."
http://expressjs.com/api.html#req.param
2015-06-02 15:36:56 +03:00
Mikael Korpela
fcb6f90293 Remove un-used hasAuthorization and requiresLogin
Looks like these aren't needed now that we have ACL.
2015-05-29 00:36:07 +03:00
Pedro Rodrigues
e11ffda6e5 Add some abstraction to local strategy login error 2015-05-28 16:56:49 +01:00
Mikael Korpela
7070796c53 Prettier res.status().format()
(due tabs — my editor has tab-spacing set to 2 so I don’t notice when
stuff like this looks crappy)
2015-05-18 19:25:02 +03:00
Mikael Korpela
fd170261ec #501 Use req.format() to content-negotiate correct response 2015-05-18 19:22:56 +03:00
Mikael Korpela
ba1a4475e9 #501 Handle 404 errors at Express backend at at Angular frontend
- `/{api|modules|lib}/*` returns error page when path doesn’t exist
(from Express).
- `/*` always returns index (from Express), but if `$state` doesn’t
exist, Angular redirects to `/not-found` (no 404 status in that case
though!)
- If `Accept: application/json` header is present without `Accept:
text/html`, return error as json. Hence looking at non existing /api/*
paths with browser would show html error, but querying them with script
would return json.
- Slightly prettier 404 error

Test:
```bash
curl http://localhost:3000/api/notfound -4 -H "Accept: application/json"
```
=> json error.

```bash
curl http://localhost:3000/api/notfound -4 -H "Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0
.8"
```
=> html error (imitates Chrome’s Accept header).

Starting point was @dotch’s PL: https://github.com/meanjs/mean/pull/503

And `req.accepts()` idea came from http://stackoverflow.com/a/9802006
2015-05-18 17:38:30 +03:00
Mikael Korpela
8190ee44a7 Merge branch 'bugfix/404/#501' of https://github.com/dotch/mean-1 into error-404-pages 2015-05-18 10:45:11 +03:00
Veikko Karsikko
c800c0a18f Hide email address and remove trailing whitespaces
Email address should not be shown to client
2015-05-07 14:26:17 +03:00
Pedro Rodrigues
b2d76b82e5 Remove more unused requires 2015-04-23 17:51:58 +01:00
Pedro Rodrigues
7f1b46b0d7 Remove unused passport require 2015-04-23 11:09:45 +01:00
Edward Sun
0dbab180a9 Removed duplicate include for crypto 2015-04-13 12:08:30 -04:00
Mikael Korpela
238bbe1ad8 Fix headers to HTML5 format
Headers were a weird mixture of html5 and xhtml. Now it's pure html5.


Use this as doctype if you really want it to be xhtml, but I don't see why would you want that with Angular:
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
```
2015-04-08 11:26:27 +02:00
dotch
74273dabb3 return a 404 for not found api, module and lib routes 2015-04-02 03:30:55 +02:00
Rupert Muchembled
08f1750d94 Correctly encode and decode password salt
The user password salt should be encoded with Base64 before being saved
to the database.

The current code adds an unecessary step of converting the result of
crypto.randomBytes() (which already returns a SlowBuffer) to a Base64
string and back again to a Buffer, and misses the final step of
converting the Buffer's bytes back to a Base64 string.

Because of this, the salt stored in the database is garbled. This is
inconvenient when manipulating the data in a terminal or text editor.

When generating the password hash, the crypto.pbkdf2Sync() method
creates a new Buffer directly from the data supplied. Due to the
incorrect encoding of the salt, entropy is lost at this step,
weakening the security of stored passwords against brute force attacks.
2015-03-07 22:10:38 +00:00
Veikko Karsikko
1897ef985b Wait for async saving and removing 2015-02-23 09:33:26 +02:00